in reply to how to make a demon in perl?

Just creating a script in /etc/rc.d/ somewhere is not enough. The runlevel startup script that calls the individual startup scripts, calls them in the foreground. So, if the startup script does not fork and exit, the bootprocess will hang forever.

Having the script fork itself, is one solution. Creating a startup script that calls your script in the background, with an '&', is another. There are probably a lot of simple startup scripts in your /etc/rc.d/* already, check them out. One note though: Linux, and RedHat in particular, uses a shell function 'daemon' instead of running the binary directly with an '&'.

Replies are listed 'Best First'.
Re: Re: you to make a demon in perl
by Sihal (Pilgrim) on Oct 01, 2002 at 11:49 UTC
    Nice I must admit that I wasn't aware of the risk of making the bootprocess hang... thanx all for your comments