From fb276c9a2c882505aa635926f36c9e6e9330ba9a Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Tue, 16 Feb 2010 17:40:35 +0100 Subject: Pay homage to Unix bondage and discipline. --- emergencyd.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emergencyd.pl b/emergencyd.pl index a0512fd..f2fed7a 100755 --- a/emergencyd.pl +++ b/emergencyd.pl @@ -104,6 +104,9 @@ if ( defined(IPV6_V6ONLY) ) { bind $socket, sockaddr_in6($port, in6addr_any) or die "Can't bind socket: $!"; if ( $opts{f} ) { + chdir("/"); + open STDIN, "/dev/null"; + POSIX::setsid; $SIG{HUP} = "IGNORE"; $SIG{INT} = "IGNORE"; my $childpid = fork; -- cgit v1.2.3