All of lore.kernel.org
 help / color / mirror / Atom feed
* Is prctl(PR_SET_CHILD_SUBREAPER) going to break my code which checks getppid == 1?
@ 2012-03-29 20:12 Karl Pickett
  2012-03-30 12:44 ` Oleg Nesterov
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Pickett @ 2012-03-29 20:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: kay.sievers, Oleg Nesterov, Lennart Poettering

Re: http://thread.gmane.org/gmane.linux.kernel/1236479

I'm wondering if this is going to break code that checks getppid() == 1?

I have a TCL/TK GUI app that spawns ssh.  I want the ssh to die immediately if the GUI process crashes, so ssh is launched with a wrapper c program that does:

   prctl(PR_SET_PDEATHSIG, SIGHUP);
   if (getppid() == 1) /* parent died already? */
       return 0;

So what is getppid() going to return for some user using this new 'session manager reaper'?  How else am I supposed to do proper processes supervision (with TCL/TK as a parent...)?  Also, this program is open source but we distribute binaries that work on as many platforms as possible... we find most users don't want to compile things.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-30 17:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 20:12 Is prctl(PR_SET_CHILD_SUBREAPER) going to break my code which checks getppid == 1? Karl Pickett
2012-03-30 12:44 ` Oleg Nesterov
2012-03-30 13:17   ` Karl Pickett
2012-03-30 13:26     ` Karl Pickett
2012-03-30 17:14     ` Oleg Nesterov

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.