jobs.c (552311f4bb98c81b1b9e0e81d74e0262fc12110b) jobs.c (0bdd387178582c53f6fd5e053636427d08bbea68)
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

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

72#include "error.h"
73#include "mystring.h"
74#include "var.h"
75#include "builtins.h"
76
77
78static struct job *jobtab; /* array of jobs */
79static int njobs; /* size of array */
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

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

72#include "error.h"
73#include "mystring.h"
74#include "var.h"
75#include "builtins.h"
76
77
78static struct job *jobtab; /* array of jobs */
79static int njobs; /* size of array */
80MKINIT pid_t backgndpid = -1; /* pid of last background process */
81MKINIT struct job *bgjob = NULL; /* last background process */
80static pid_t backgndpid = -1; /* pid of last background process */
81static struct job *bgjob = NULL; /* last background process */
82#if JOBS
83static struct job *jobmru; /* most recently used job list */
84static pid_t initialpgrp; /* pgrp of shell on invocation */
85#endif
86int in_waitcmd = 0; /* are we in waitcmd()? */
87volatile sig_atomic_t breakwaitcmd = 0; /* should wait be terminated? */
88static int ttyfd = -1;
89

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

111static void printjobcmd(struct job *);
112static void showjob(struct job *, int);
113
114
115/*
116 * Turn job control on and off.
117 */
118
82#if JOBS
83static struct job *jobmru; /* most recently used job list */
84static pid_t initialpgrp; /* pgrp of shell on invocation */
85#endif
86int in_waitcmd = 0; /* are we in waitcmd()? */
87volatile sig_atomic_t breakwaitcmd = 0; /* should wait be terminated? */
88static int ttyfd = -1;
89

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

111static void printjobcmd(struct job *);
112static void showjob(struct job *, int);
113
114
115/*
116 * Turn job control on and off.
117 */
118
119MKINIT int jobctl;
119static int jobctl;
120
121#if JOBS
122void
123setjobctl(int on)
124{
125 int i;
126
127 if (on == jobctl || rootshell == 0)

--- 1332 unchanged lines hidden ---
120
121#if JOBS
122void
123setjobctl(int on)
124{
125 int i;
126
127 if (on == jobctl || rootshell == 0)

--- 1332 unchanged lines hidden ---