diff options
author | Rob Landley <rob@landley.net> | 2006-05-23 00:28:06 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-05-23 00:28:06 +0000 |
commit | fa6b5e62c25cda78f4453ad3b3086f337e7bc23f (patch) | |
tree | 12fcf73c4de8647c130706bc7ef78ce281fa3f61 /coreutils | |
parent | a81cec9192c5cd00f8713fea9af6573cc363344d (diff) |
It takes _talent_ to implement a version of nohup that does everything except
the actual blocking of HUP.
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/nohup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/nohup.c b/coreutils/nohup.c index ea1c4c55a..50f54cca6 100644 --- a/coreutils/nohup.c +++ b/coreutils/nohup.c @@ -10,6 +10,7 @@ */ #include <fcntl.h> +#include <signal.h> #include <unistd.h> #include "busybox.h" @@ -44,8 +45,8 @@ int nohup_main(int argc, char *argv[]) temp = isatty(2); if (temp) fdprintf(2,"Writing to %s\n", home ? home : nohupout); dup2(temp ? 1 : nullfd, 2); - close(nullfd); + signal (SIGHUP, SIG_IGN); // Exec our new program. |