9 date 93.02.26.21.57.34; author jromine; state Exp;
14 date 92.12.15.00.20.22; author jromine; state Exp;
19 date 92.12.14.17.47.34; author jromine; state Exp;
24 date 92.12.14.17.44.38; author jromine; state Exp;
38 @/* pidstatus.c - report child's status */
40 static char ident[] = "@@(#)$Id: pidstatus.c,v 1.3 1992/12/15 00:20:22 jromine Exp jromine $";
50 static char *sigs[] = {
55 "Illegal instruction",
68 "Urgent I/O condition",
76 "Stopped (tty input)",
77 "Stopped (tty output)",
78 "Tty input interrupt",
79 "Cputime limit exceeded",
80 "Filesize limit exceeded",
84 extern char *sys_siglist[];
86 #endif /* BSD44 defines sys_siglist in signal.h */
90 int pidstatus (status, fp, cp)
97 if ((status & 0xff00) == 0xff00)
100 switch (signum = status & 0x007f) {
102 if (signum = ((status & 0xff00) >> 8)) {
104 fprintf (fp, "%s: ", cp);
105 fprintf (fp, "Exit %d\n", signum);
114 fprintf (fp, "%s: ", cp);
116 if (signum >= sizeof sigs || sigs[signum] == NULL)
117 fprintf (fp, "Signal %d", signum);
119 fprintf (fp, "%s", sigs[signum]);
122 fprintf (fp, "Signal %d", signum);
124 fprintf (fp, "%s", sys_siglist[signum]);
126 fprintf (fp, "%s\n", status & 0x80 ? " (core dumped)" : "");
142 static char ident[] = "@@(#)$Id: pidstatus.c,v 1.2 1992/12/14 17:47:34 jromine Exp jromine $";
155 static char ident[] = "@@(#)$Id: pidwait.c,v 1.9 1992/12/14 17:10:58 jromine Exp $";