All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott James Remnant <scott@ubuntu.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Matt Helsley <matthltc@us.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: + proc-connector-add-event-for-process-becoming-session-leader.patch added to -mm tree
Date: Wed, 24 Jun 2009 09:53:51 +0100	[thread overview]
Message-ID: <1245833631.3280.0.camel@wing-commander> (raw)
In-Reply-To: <20090623202937.GA31252@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

On Tue, 2009-06-23 at 22:29 +0200, Oleg Nesterov wrote:

> > 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().
> 
Actually, I specifically wanted to receive this event if the process
called daemonize() which is why this is done here rather than in
sys_setsid()

The new session is important information to init in figuring out what
the process is up to (ie, fork(), setsid(), fork() = daemonise)

Scott
-- 
Scott James Remnant
scott@ubuntu.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-06-24  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 20:29 + proc-connector-add-event-for-process-becoming-session-leader.patch added to -mm tree Oleg Nesterov
2009-06-24  8:53 ` Scott James Remnant [this message]
2009-06-24 14:44   ` Oleg Nesterov
  -- strict thread matches above, loose matches on Subject: below --
2009-06-22 23:19 akpm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245833631.3280.0.camel@wing-commander \
    --to=scott@ubuntu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.