Deleted Added
full compact
jobs.c (127958) jobs.c (138312)
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

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
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

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 127958 2004-04-06 20:06:54Z markm $");
39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 138312 2004-12-02 13:12:43Z maxim $");
40
41#include <fcntl.h>
42#include <signal.h>
43#include <errno.h>
44#include <paths.h>
45#include <unistd.h>
46#include <stdlib.h>
47#include <sys/param.h>

--- 873 unchanged lines hidden (view full) ---

921 do {
922 pid = waitproc(block, &status);
923 TRACE(("wait returns %d, status=%d\n", (int)pid, status));
924 } while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) ||
925 (pid > 0 && WIFSTOPPED(status) && !iflag));
926 in_dowait--;
927 if (breakwaitcmd != 0) {
928 breakwaitcmd = 0;
40
41#include <fcntl.h>
42#include <signal.h>
43#include <errno.h>
44#include <paths.h>
45#include <unistd.h>
46#include <stdlib.h>
47#include <sys/param.h>

--- 873 unchanged lines hidden (view full) ---

921 do {
922 pid = waitproc(block, &status);
923 TRACE(("wait returns %d, status=%d\n", (int)pid, status));
924 } while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) ||
925 (pid > 0 && WIFSTOPPED(status) && !iflag));
926 in_dowait--;
927 if (breakwaitcmd != 0) {
928 breakwaitcmd = 0;
929 return -1;
929 if (pid <= 0)
930 return -1;
930 }
931 if (pid <= 0)
932 return pid;
933 INTOFF;
934 thisjob = NULL;
935 for (jp = jobtab ; jp < jobtab + njobs ; jp++) {
936 if (jp->used) {
937 done = 1;

--- 303 unchanged lines hidden ---
931 }
932 if (pid <= 0)
933 return pid;
934 INTOFF;
935 thisjob = NULL;
936 for (jp = jobtab ; jp < jobtab + njobs ; jp++) {
937 if (jp->used) {
938 done = 1;

--- 303 unchanged lines hidden ---