in reply to perl scripts as daemons

Hi,
I don't know if this is the sort of reply you're after, but out of interest here is a small daemonizing subroutine you could use:
use POSIX qw/setsid/; sub daemonise { my ($self) = @_; chdir('/') or die "Can't chdir to /: $!"; open STDIN, "</dev/null"; defined(my $pid = fork) or die "Can't fork: $!"; exit if $pid; setsid(); $SIG{HUP} = \&hup_handler($self); # you need to define this # we store our pid's for shutdown if ( $self->{pidfile} ) {   open PIDFILE, "> " . $self->{pidfile};   print PIDFILE "$$\n";   close PIDFILE; } }
Mike