Subj : background scripts To : Jame Clay From : Jasen Betts Date : Mon Apr 01 2002 11:32 pm Hi Jame. 31-Mar-02 08:54:40, Jame Clay wrote to James Vahn JC> James, >> How do you fork a child process from within Perl? I think that's >> the proper terminolgy JC> To "fork" a program is to start another copy of itself... JC> >- I want to run a script that exits but >> remains running in memory. JC> Well, if it exits it won't "remain running"; something running in JC> the background is no different from any other program in that JC> respect... The trick is to fork and then have the main branch exit and the fork continue executinng. If it's done right init inherts parenthood of the orphaned child process, thus the process becomes a daemon. >> For some reason the init scripts don't like "&", possibly the shell version sh vs bash ? JC> If you're referring to the startup "init" scripts; that's likely JC> because they're already being put into the background by the JC> program that's running them... nope. init scrips are run in init's foreground one at a time. -=> Bye <=- --- * Origin: Wasting time is an important part of living. (3:640/531.42) .