Grant Edwards | 27 Jun 2012 00:38
Picon

How to start program that won't die when group is killed?

I'm trying to figure out how to start a program such that it won't die
when the program's grandparent dies (I think the grandparent is the
session leader).

Here's the scenario:

  1) lighttpd/PHP calls ash-prog-A.

  2) ash-prog-A starts ash-prog-B (a long-running program that
     needs to keep running when lighttpd gets stopped).       

I've tried both "nohup &" and "start-stop-daemon -S", and neither
work: ash-prog-B continues to run after ash-prog-A exits, but when
lighttpd is stopped, ash-prog-B dies.

IIRC, one solves this problem in bash by using the "disown" built-in.

How does one do something similar with busybox/ash?

--

-- 
Grant Edwards

Gmane