svn commit: trunk/busybox/coreutils
landley at busybox.net
landley at busybox.net
Tue May 23 00:28:09 UTC 2006
Author: landley
Date: 2006-05-22 17:28:06 -0700 (Mon, 22 May 2006)
New Revision: 15159
Log:
It takes _talent_ to implement a version of nohup that does everything except
the actual blocking of HUP.
Modified:
trunk/busybox/coreutils/nohup.c
Changeset:
Modified: trunk/busybox/coreutils/nohup.c
===================================================================
--- trunk/busybox/coreutils/nohup.c 2006-05-21 22:06:59 UTC (rev 15158)
+++ trunk/busybox/coreutils/nohup.c 2006-05-23 00:28:06 UTC (rev 15159)
@@ -10,6 +10,7 @@
*/
#include <fcntl.h>
+#include <signal.h>
#include <unistd.h>
#include "busybox.h"
@@ -44,8 +45,8 @@
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.
More information about the busybox-cvs
mailing list