supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* orphan processes
@ 2007-06-06  0:17 Adam Megacz
  2007-06-06  0:43 ` Paul Jarc
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Megacz @ 2007-06-06  0:17 UTC (permalink / raw)
  To: supervision


I've got some media-encoding scripts running under runit that seem to
cause orphan processes quite a lot -- in some chain of script invocations,

  runsv
    |
    +-- script1.sh
       |
       +-- script2.sh
          |
          +-- script3.sh

Somehow script2.sh dies, script3 gets reparented to init (I'm running
runit-as-a-child-of-svrinit), and then eventually when script1
finishes and the whole thing restarts, I wind up with two copies of
script3.sh.

Anyways, this got me thinking: is there any way in UNIX for the leader
of a process/session group to tell the system that orphan processes in
that group should be reparented to the leader rather than "pid 1"?  If
there were some way, I could add an option to runsv to tell it to
immediately kill any process which unexpectedly becomes its child (ie
orphans).

  - a

-- 
PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380



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

end of thread, other threads:[~2007-06-06  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06  0:17 orphan processes Adam Megacz
2007-06-06  0:43 ` Paul Jarc
2007-06-06  1:09   ` Charlie Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).