summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemergencyd.pl3
1 files changed, 3 insertions, 0 deletions
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;