On Sun, 24 Aug 2003 00:10, sungo wrote; su> fork and exit unless DEBUG; # provided of course you have a su> DEBUG constant very early in your program. that way, in debug su> mode, the program will stay attached and spew its debug su> content. otherwise, it will daemonize.
If you're going to ignore the appropriate module, you should at least also disassociate from the terminal and set a new process session ID: use POSIX qw(setsid); open STDIN, "</dev/null" or die $!; open STDOUT, ">/dev/null" or die $!; open STDERR, ">&STDOUT" or die $!; fork and exit; setsid(); -- Sam Vilain, [EMAIL PROTECTED] The flush toilet is the basis of Western civilization. ALAN COULT
