From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933574Ab0BDU7K (ORCPT ); Thu, 4 Feb 2010 15:59:10 -0500 Received: from mail-fx0-f220.google.com ([209.85.220.220]:47863 "EHLO mail-fx0-f220.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932488Ab0BDU7E (ORCPT ); Thu, 4 Feb 2010 15:59:04 -0500 Subject: Re: [PATCH] exit: PR_SET_ANCHOR for marking processes as reapers for child processes From: Kay Sievers To: Kay Sievers Cc: Lennart Poettering , linux-kernel@vger.kernel.org In-Reply-To: <1265298175.24100.8.camel@yio.site> References: <20100202120457.GA19605@omega> <1265298175.24100.8.camel@yio.site> Content-Type: text/plain; charset="UTF-8" Date: Thu, 04 Feb 2010 21:59:26 +0100 Message-ID: <1265317166.2207.1.camel@yio.site> Mime-Version: 1.0 X-Mailer: Evolution 2.29.5 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2010-02-04 at 16:42 +0100, Kay Sievers wrote: > Sounds good to me. And seems useful for all sorts of session tracking > and "prettifying ps". :) Here is the output of 'ps" with a wrapped gnome-session with the anchor flag set. All the started programs stay childs of the session, instead of becoming childs of init: Thanks, Kay PID TTY STAT TIME COMMAND 2 ? S 0:00 [kthreadd] 3 ? S 0:00 \_ [migration/0] 4 ? S 0:00 \_ [ksoftirqd/0] 5 ? S 0:00 \_ [migration/1] 6 ? S 0:00 \_ [ksoftirqd/1] 7 ? S 0:00 \_ [events/0] 8 ? S 0:00 \_ [events/1] 9 ? S 0:00 \_ [khelper] 10 ? S 0:00 \_ [async/mgr] 11 ? S 0:00 \_ [sync_supers] 12 ? S 0:00 \_ [bdi-default] 13 ? S 0:00 \_ [kblockd/0] 14 ? S 0:00 \_ [kblockd/1] 15 ? S 0:00 \_ [kacpid] 16 ? S 0:00 \_ [kacpi_notify] 17 ? S 0:00 \_ [kacpi_hotplug] 18 ? S 0:00 \_ [ata/0] 19 ? S 0:00 \_ [ata/1] 20 ? S 0:00 \_ [ata_aux] 21 ? S 0:00 \_ [kseriod] 24 ? S 0:00 \_ [kondemand/0] 25 ? S 0:00 \_ [kondemand/1] 26 ? S 0:00 \_ [kswapd0] 27 ? S 0:00 \_ [aio/0] 28 ? S 0:00 \_ [aio/1] 29 ? S 0:00 \_ [crypto/0] 30 ? S 0:00 \_ [crypto/1] 33 ? S 0:00 \_ [scsi_eh_0] 34 ? S 0:00 \_ [scsi_eh_1] 35 ? S 0:00 \_ [scsi_eh_2] 36 ? S 0:00 \_ [scsi_eh_3] 41 ? S 0:00 \_ [kpsmoused] 43 ? S 0:00 \_ [jbd2/sda1-8] 44 ? S 0:00 \_ [ext4-dio-unwrit] 45 ? S 0:00 \_ [ext4-dio-unwrit] 233 ? S 0:00 \_ [ksuspend_usbd] 238 ? S 0:00 \_ [khubd] 272 ? S 0:00 \_ [cfg80211] 283 ? S 0:00 \_ [kvm-irqfd-clean] 324 ? S 0:00 \_ [ktpacpid] 339 ? S 0:00 \_ [iwlagn] 340 ? S 0:00 \_ [phy0] 364 ? S 0:00 \_ [i915] 425 ? S 0:00 \_ [hd-audio0] 471 ? S 0:00 \_ [flush-259:0] 489 ? S 0:00 \_ [usbhid_resumer] 502 ? S 0:00 \_ [scsi_eh_4] 503 ? S 0:00 \_ [usb-storage] 514 ? S 0:00 \_ [kauditd] 526 ? S 0:00 \_ [kstriped] 564 ? S 0:00 \_ [kjournald] 1 ? Ss 0:00 init [5] 96 ? S