9 date 92.12.15.00.20.22; author jromine; state Exp;
14 date 92.12.14.17.10.58; author jromine; state Exp;
19 date 92.11.23.22.56.09; author jromine; state Exp;
24 date 92.11.11.22.04.30; author jromine; state Exp;
29 date 92.05.19.20.57.43; author jromine; state Exp;
34 date 92.01.29.23.57.28; author jromine; state Exp;
39 date 90.04.05.15.31.19; author sources; state Exp;
44 date 90.04.05.14.45.34; author sources; state Exp;
49 date 90.02.05.14.23.23; author sources; state Exp;
54 date 90.02.05.14.23.17; author sources; state Exp;
68 @/* pidwait.c - wait for child to exit */
70 static char ident[] = "@@(#)$Id: pidwait.c,v 1.9 1992/12/14 17:10:58 jromine Exp jromine $";
76 #if defined (BSD42) || defined (SVR4)
81 int pidwait (id, sigsok)
86 TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
87 #if defined(BSD42) && !defined(WAITINT)
93 if (sigsok == NOTOK) {
94 #ifdef notdef /* I don't see why to trap these... */
95 hstat = signal (SIGHUP, SIG_IGN);
96 tstat = signal (SIGTERM, SIG_IGN);
98 istat = signal (SIGINT, SIG_IGN);
99 qstat = signal (SIGQUIT, SIG_IGN);
103 pid = waitpid (id, &status, WUNTRACED);
105 while ((pid = wait (&status)) != NOTOK && pid != id)
109 if (sigsok == NOTOK) {
111 (void) signal (SIGHUP, hstat);
112 (void) signal (SIGTERM, tstat);
114 (void) signal (SIGINT, istat);
115 (void) signal (SIGQUIT, qstat);
118 #if defined(BSD42) && !defined(WAITINT)
119 return (pid == NOTOK ? NOTOK : status.w_status);
121 return (pid == NOTOK ? NOTOK : status);
134 static char ident[] = "@@(#)$Id: pidwait.c,v 1.8 1992/11/23 22:56:09 jromine Exp jromine $";
141 @fix arg order in waitpid()
146 static char ident[] = "@@(#)$Id: pidwait.c,v 1.7 1992/11/11 22:04:30 jromine Exp jromine $";
158 return (pid == NOTOK ? NOTOK : status.w_status);
164 @use union wait under BSD42 only
169 static char ident[] = "@@(#)$Id: pidwait.c,v 1.6 1992/05/19 20:57:43 jromine Exp jromine $";
175 pid = waitpid (&status, id, 0);
186 static char ident[] = "@@(#)$Id: pidwait.c,v 1.5 1992/01/29 23:57:28 jromine Exp jromine $";
202 @don't ignore HUP or TERM
207 static char ident[] = "@@(#)$Id: pidwait.c,v 1.4 1990/04/05 15:31:19 sources Exp jromine $";
233 static char ident[] = "@@(#)$Id:$";
237 tstat = signal (SIGTERM, SIG_IGN);
241 (void) signal (SIGTERM, tstat);
252 static char ident[] = "$Id:";
258 @*** empty log message ***
272 int (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();