From 79aab570afcc7259fe6526a6acbe9b2b85ee1072 Mon Sep 17 00:00:00 2001 From: landley Date: Tue, 23 May 2006 00:28:06 +0000 Subject: It takes _talent_ to implement a version of nohup that does everything except the actual blocking of HUP. git-svn-id: svn://busybox.net/trunk/busybox@15159 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- coreutils/nohup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include #include #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. -- cgit v1.2.3-55-g6feb