]>
diplodocus.org Git - nmh/blob - sbr/push.c
3 * push.c -- push a fork into the background
19 for (i
= 0; (pid
= fork()) == -1 && i
< 5; i
++)
25 advise (NULL
, "unable to fork, so can't push...");
29 /* child, block a few signals and continue */
30 SIGNAL (SIGHUP
, SIG_IGN
);
31 SIGNAL (SIGINT
, SIG_IGN
);
32 SIGNAL (SIGQUIT
, SIG_IGN
);
33 SIGNAL (SIGTERM
, SIG_IGN
);
35 SIGNAL (SIGTSTP
, SIG_IGN
);
36 SIGNAL (SIGTTIN
, SIG_IGN
);
37 SIGNAL (SIGTTOU
, SIG_IGN
);
39 freopen ("/dev/null", "r", stdin
);
40 freopen ("/dev/null", "w", stdout
);
44 /* parent, just exit */