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

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)jobs.h 8.2 (Berkeley) 5/4/95
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

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)jobs.h 8.2 (Berkeley) 5/4/95
33 * $FreeBSD: head/bin/sh/jobs.h 127958 2004-04-06 20:06:54Z markm $
33 * $FreeBSD: head/bin/sh/jobs.h 163085 2006-10-07 16:51:16Z stefanf $
34 */
35
36/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */
37#define FORK_FG 0
38#define FORK_BG 1
39#define FORK_NOJOB 2
40
41#include <signal.h> /* for sig_atomic_t */

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

69 char changed; /* true if status has changed */
70 char foreground; /* true if running in the foreground */
71#if JOBS
72 char jobctl; /* job running under job control */
73 struct job *next; /* job used after this one */
74#endif
75};
76
34 */
35
36/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */
37#define FORK_FG 0
38#define FORK_BG 1
39#define FORK_NOJOB 2
40
41#include <signal.h> /* for sig_atomic_t */

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

69 char changed; /* true if status has changed */
70 char foreground; /* true if running in the foreground */
71#if JOBS
72 char jobctl; /* job running under job control */
73 struct job *next; /* job used after this one */
74#endif
75};
76
77enum {
78 SHOWJOBS_DEFAULT, /* job number, status, command */
79 SHOWJOBS_VERBOSE, /* job number, PID, status, command */
80 SHOWJOBS_PIDS, /* PID only */
81 SHOWJOBS_PGIDS /* PID of the group leader only */
82};
83
77extern pid_t backgndpid; /* pid of last background process */
78extern int job_warning; /* user was warned about stopped jobs */
79extern int in_waitcmd; /* are we in waitcmd()? */
80extern int in_dowait; /* are we in dowait()? */
81extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */
82
83void setjobctl(int);
84int fgcmd(int, char **);
85int bgcmd(int, char **);
86int jobscmd(int, char **);
84extern pid_t backgndpid; /* pid of last background process */
85extern int job_warning; /* user was warned about stopped jobs */
86extern int in_waitcmd; /* are we in waitcmd()? */
87extern int in_dowait; /* are we in dowait()? */
88extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */
89
90void setjobctl(int);
91int fgcmd(int, char **);
92int bgcmd(int, char **);
93int jobscmd(int, char **);
87void showjobs(int, int, int);
94void showjobs(int, int);
88int waitcmd(int, char **);
89int jobidcmd(int, char **);
90struct job *makejob(union node *, int);
91pid_t forkshell(struct job *, union node *, int);
92int waitforjob(struct job *, int *);
93int stoppedjobs(void);
94char *commandtext(union node *);
95
96#if ! JOBS
97#define setjobctl(on) /* do nothing */
98#endif
95int waitcmd(int, char **);
96int jobidcmd(int, char **);
97struct job *makejob(union node *, int);
98pid_t forkshell(struct job *, union node *, int);
99int waitforjob(struct job *, int *);
100int stoppedjobs(void);
101char *commandtext(union node *);
102
103#if ! JOBS
104#define setjobctl(on) /* do nothing */
105#endif