summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+config@madore.org>2010-02-16 17:40:35 +0100
committerDavid A. Madore <david+config@madore.org>2010-02-16 17:40:35 +0100
commitfb276c9a2c882505aa635926f36c9e6e9330ba9a (patch)
tree2b3470d01158056627902cdef81755dbd41b7544
parent426c4f4bcad9dd890ad8dbbc28be5b3690fd6664 (diff)
downloademergency-fb276c9a2c882505aa635926f36c9e6e9330ba9a.tar.gz
emergency-fb276c9a2c882505aa635926f36c9e6e9330ba9a.tar.bz2
emergency-fb276c9a2c882505aa635926f36c9e6e9330ba9a.zip
Pay homage to Unix bondage and discipline.
-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;