comparison toys/posix/nohup.c @ 1727:c0ef9b7976f0 draft

Use xsignal() instead of signal().
author Rob Landley <rob@landley.net>
date Tue, 10 Mar 2015 11:07:28 -0500
parents cbb1aca81eca
children
comparison
equal deleted inserted replaced
1726:26170eb7685d 1727:c0ef9b7976f0
19 19
20 #include "toys.h" 20 #include "toys.h"
21 21
22 void nohup_main(void) 22 void nohup_main(void)
23 { 23 {
24 signal(SIGHUP, SIG_IGN); 24 xsignal(SIGHUP, SIG_IGN);
25 if (isatty(1)) { 25 if (isatty(1)) {
26 close(1); 26 close(1);
27 if (-1 == open("nohup.out", O_CREAT|O_APPEND|O_WRONLY, 27 if (-1 == open("nohup.out", O_CREAT|O_APPEND|O_WRONLY,
28 S_IRUSR|S_IWUSR )) 28 S_IRUSR|S_IWUSR ))
29 { 29 {