supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
To: Adam Megacz <adam@megacz.com>
Cc: supervision@list.skarnet.org
Subject: Re: orphan processes
Date: Tue, 05 Jun 2007 20:43:36 -0400	[thread overview]
Message-ID: <m3fy55ewts.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <x3y7iyey1l.fsf@nowhere.com> (Adam Megacz's message of "Tue, 05 Jun 2007 17:17:42 -0700")

Adam Megacz <adam@megacz.com> wrote:
> 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.

If script1 starts by putting itself in a new process group before
spawning any children, then at the end it can send SIGTERM to its
process group to kill all related processes.

> 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"?

I don't think so.


paul


  reply	other threads:[~2007-06-06  0:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06  0:17 Adam Megacz
2007-06-06  0:43 ` Paul Jarc [this message]
2007-06-06  1:09   ` Charlie Brady

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=m3fy55ewts.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=adam@megacz.com \
    --cc=supervision@list.skarnet.org \
    /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 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).