head 1.3; access; symbols; locks; strict; comment @ * @; 1.3 date 92.12.15.00.20.22; author jromine; state Exp; branches; next 1.2; 1.2 date 92.12.14.17.47.34; author jromine; state Exp; branches; next 1.1; 1.1 date 92.12.14.17.44.38; author jromine; state Exp; branches; next ; desc @@ 1.3 log @endif sugar @ text @/* push.c - push a fork into the background */ #ifndef lint static char ident[] = "@@(#)$Id: push.c,v 1.2 1992/12/14 17:47:34 jromine Exp jromine $"; #endif /* lint */ #include "../h/mh.h" #include #include void push () { register int i; for (i = 0; i < 5; i++) { switch (fork ()) { case NOTOK: sleep (5); continue; case OK: (void) signal (SIGHUP, SIG_IGN); (void) signal (SIGINT, SIG_IGN); (void) signal (SIGQUIT, SIG_IGN); (void) signal (SIGTERM, SIG_IGN); #ifdef SIGTSTP (void) signal (SIGTSTP, SIG_IGN); (void) signal (SIGTTIN, SIG_IGN); (void) signal (SIGTTOU, SIG_IGN); #endif /* SIGTSTP */ (void) freopen ("/dev/null", "r", stdin); (void) freopen ("/dev/null", "w", stdout); break; default: done (0); } break; } if (i >= 5) advise (NULLCP, "unable to fork, so can't push..."); } @ 1.2 log @add id @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id: pidwait.c,v 1.9 1992/12/14 17:10:58 jromine Exp $"; d29 1 a29 1 #endif SIGTSTP @ 1.1 log @Initial revision @ text @d2 3 @