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