jobs.c (218306) | jobs.c (222684) |
---|---|
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 218306 2011-02-04 22:47:55Z jilles $"); | 39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 222684 2011-06-04 15:05:52Z jilles $"); |
40 41#include <sys/ioctl.h> 42#include <sys/param.h> 43#include <sys/resource.h> 44#include <sys/time.h> 45#include <sys/wait.h> 46#include <errno.h> 47#include <fcntl.h> --- 767 unchanged lines hidden (view full) --- 815 setsignal(SIGTTOU); 816 } else if (mode == FORK_BG) { 817 ignoresig(SIGINT); 818 ignoresig(SIGQUIT); 819 if ((jp == NULL || jp->nprocs == 0) && 820 ! fd0_redirected_p ()) { 821 close(0); 822 if (open(_PATH_DEVNULL, O_RDONLY) != 0) | 40 41#include <sys/ioctl.h> 42#include <sys/param.h> 43#include <sys/resource.h> 44#include <sys/time.h> 45#include <sys/wait.h> 46#include <errno.h> 47#include <fcntl.h> --- 767 unchanged lines hidden (view full) --- 815 setsignal(SIGTTOU); 816 } else if (mode == FORK_BG) { 817 ignoresig(SIGINT); 818 ignoresig(SIGQUIT); 819 if ((jp == NULL || jp->nprocs == 0) && 820 ! fd0_redirected_p ()) { 821 close(0); 822 if (open(_PATH_DEVNULL, O_RDONLY) != 0) |
823 error("Can't open %s: %s", | 823 error("cannot open %s: %s", |
824 _PATH_DEVNULL, strerror(errno)); 825 } 826 } 827#else 828 if (mode == FORK_BG) { 829 ignoresig(SIGINT); 830 ignoresig(SIGQUIT); 831 if ((jp == NULL || jp->nprocs == 0) && 832 ! fd0_redirected_p ()) { 833 close(0); 834 if (open(_PATH_DEVNULL, O_RDONLY) != 0) | 824 _PATH_DEVNULL, strerror(errno)); 825 } 826 } 827#else 828 if (mode == FORK_BG) { 829 ignoresig(SIGINT); 830 ignoresig(SIGQUIT); 831 if ((jp == NULL || jp->nprocs == 0) && 832 ! fd0_redirected_p ()) { 833 close(0); 834 if (open(_PATH_DEVNULL, O_RDONLY) != 0) |
835 error("Can't open %s: %s", | 835 error("cannot open %s: %s", |
836 _PATH_DEVNULL, strerror(errno)); 837 } 838 } 839#endif 840 INTOFF; 841 for (i = njobs, p = jobtab ; --i >= 0 ; p++) 842 if (p->used) 843 freejob(p); --- 511 unchanged lines hidden --- | 836 _PATH_DEVNULL, strerror(errno)); 837 } 838 } 839#endif 840 INTOFF; 841 for (i = njobs, p = jobtab ; --i >= 0 ; p++) 842 if (p->used) 843 freejob(p); --- 511 unchanged lines hidden --- |