jobs.c (69793) | jobs.c (72086) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint 38#if 0 39static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; 40#endif 41static const char rcsid[] = | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint 38#if 0 39static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; 40#endif 41static const char rcsid[] = |
42 "$FreeBSD: head/bin/sh/jobs.c 69793 2000-12-09 09:35:55Z obrien $"; | 42 "$FreeBSD: head/bin/sh/jobs.c 72086 2001-02-06 10:29:34Z cracauer $"; |
43#endif /* not lint */ 44 45#include <fcntl.h> 46#include <signal.h> 47#include <errno.h> 48#include <unistd.h> 49#include <stdlib.h> 50#include <sys/param.h> --- 727 unchanged lines hidden (view full) --- 778 int core; 779 int sig; 780 781 in_dowait++; 782 TRACE(("dowait(%d) called\n", block)); 783 do { 784 pid = waitproc(block, &status); 785 TRACE(("wait returns %d, status=%d\n", pid, status)); | 43#endif /* not lint */ 44 45#include <fcntl.h> 46#include <signal.h> 47#include <errno.h> 48#include <unistd.h> 49#include <stdlib.h> 50#include <sys/param.h> --- 727 unchanged lines hidden (view full) --- 778 int core; 779 int sig; 780 781 in_dowait++; 782 TRACE(("dowait(%d) called\n", block)); 783 do { 784 pid = waitproc(block, &status); 785 TRACE(("wait returns %d, status=%d\n", pid, status)); |
786 } while (pid == -1 && errno == EINTR && breakwaitcmd == 0); | 786 } while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) || 787 (WIFSTOPPED(status) && !iflag)); |
787 in_dowait--; 788 if (breakwaitcmd != 0) { 789 breakwaitcmd = 0; 790 return -1; 791 } 792 if (pid <= 0) 793 return pid; 794 INTOFF; --- 363 unchanged lines hidden --- | 788 in_dowait--; 789 if (breakwaitcmd != 0) { 790 breakwaitcmd = 0; 791 return -1; 792 } 793 if (pid <= 0) 794 return pid; 795 INTOFF; --- 363 unchanged lines hidden --- |