develooper Front page | perl.beginners | Postings from April 2002

Re: fork() with no wait()

Thread Previous
Chas Owens
April 1, 2002 12:22
Re: fork() with no wait()
Message ID:
On Mon, 2002-04-01 at 14:42, Rob Lee wrote:
> I'd like to fork my program without waiting for the child to exit.
> My child will be a sub with an infinite loop, so I'd like the parent to 
> continue on it's merry way.
> Solutions?
> -R

<snip herf="perldoc -f fork">
If you "fork" without ever waiting on your chil­
dren, you will accumulate zombies.  On some sys­
tems, you can avoid this by setting "$SIG{CHLD}"
to ""IGNORE"".  See also the perlipc manpage for
more examples of forking and reaping moribund

Today is Sweetmorn the 18th day of Discord in the YOLD 3168

Missile Address: 33:48:3.521N  84:23:34.786W

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About