[rescue] Force detachment of background process?

Eric Webb ttlchaos at randomc.com
Sun Dec 22 16:55:22 CST 2002


Let's say that program A calls korn script B.  Korn script B does some 
checking, and optionally backgrounds perl script C ("program.pl > logfile 
&").  It appears that korn script B completes right away as it should, 
leaving perl script C running in the background.  Unfortunately, control is 
never passed back to program A until perl script C exits.

While perl script C is being backgrounded, it isn't being detached from the 
parent.  How can I force this?  The only idea I have is for korn script B to 
nohup background perl script C, then look up it's own process # and kill 
itself.  Would that sever the connection of child C back to parent A?

This is being done on AIX, it it matters, though I presume the principles work 
everywhere.


-E.



More information about the rescue mailing list