lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + proc-connector-add-event-for-process-becoming-session-leader.patch added to -mm tree
> The act of a process becoming a session leader is a useful signal to a
> supervising init daemon such as Upstart.
...
> @@ -360,8 +360,10 @@ void __set_special_pids(struct pid *pid)
> {
> struct task_struct *curr = current->group_leader;
>
> - if (task_session(curr) != pid)
> + if (task_session(curr) != pid) {
> change_pid(curr, PIDTYPE_SID, pid);
> + proc_sid_connector(curr);
> + }

Wouldn't it better to change sys_setsid() then? This looks more clear
imho, and we can move proc_sid_connector() outside of tasklist_lock.

Note also that __set_special_pids() does not neccessary mean we are
becoming a session leader, see daemonize().

Oleg.



\
 
 \ /
  Last update: 2009-06-24 01:47    [W:0.052 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site