Scott James Remnant 02b51df1b0 proc connector: add event for process becoming session leader
The act of a process becoming a session leader is a useful signal to a
supervising init daemon such as Upstart.

While a daemon will normally do this as part of the process of becoming a
daemon, it is rare for its children to do so.  When the children do, it is
nearly always a sign that the child should be considered detached from the
parent and not supervised along with it.

The poster-child example is OpenSSH; the per-login children call setsid()
so that they may control the pty connected to them.  If the primary daemon
dies or is restarted, we do not want to consider the per-login children
and want to respawn the primary daemon without killing the children.

This patch adds a new PROC_SID_EVENT and associated structure to the
proc_event event_data union, it arranges for this to be emitted when the
special PIDTYPE_SID pid is set.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Acked-by: Matt Helsley <matthltc@us.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:29 -07:00
..
2009-09-15 09:37:12 -07:00
2009-09-23 07:39:29 -07:00
2009-09-09 11:19:00 -04:00
2009-09-19 13:13:33 -07:00
2009-09-20 16:09:20 +05:30
2009-07-29 19:10:35 -07:00
2009-09-18 09:48:52 -07:00
2009-09-14 17:41:42 -07:00
2009-09-22 07:17:25 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 17:52:57 -07:00
2009-09-11 12:54:58 -07:00
2009-08-19 23:08:24 +04:00
2009-08-21 15:30:12 -07:00
2009-07-31 08:55:48 +02:00
2009-08-29 15:53:00 +02:00
2009-08-17 22:38:04 -04:00
2009-09-10 10:46:47 +03:00
2009-09-19 13:13:17 -07:00
2009-09-22 07:17:33 -07:00
2009-09-18 21:22:08 +02:00
2009-07-30 16:03:45 +09:30
2009-09-23 07:39:28 -07:00
2009-09-22 07:17:35 -07:00
2009-09-22 07:17:41 -07:00
2009-09-18 21:22:08 +02:00
2009-09-21 15:14:51 +02:00
2009-08-12 08:21:39 -07:00
2009-09-22 07:17:47 -07:00
2009-07-29 19:10:36 -07:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-08-23 19:13:02 -07:00
2009-09-01 12:48:21 -04:00
2009-09-22 07:17:31 -07:00
2009-08-31 18:08:51 +02:00
2009-09-02 01:03:43 -07:00
2009-08-30 22:26:34 +02:00
2009-09-16 16:44:33 +02:00
2009-08-26 12:39:29 +01:00
2009-09-22 07:17:30 -07:00
2009-09-19 13:13:25 -07:00
2009-09-19 13:13:26 -07:00
2009-09-15 16:51:30 +02:00
2009-09-21 15:14:53 +02:00