-/* $OpenBSD: jobs.c,v 1.57 2018/01/05 15:44:31 jca Exp $ */
+/* $OpenBSD: jobs.c,v 1.58 2018/01/08 22:22:28 benno Exp $ */
/*
* Process and job control
/* Make j the last async process
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
j_set_async(Job *j)
/* Start a job: set STARTED, check for held signals and set j->last_proc
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
j_startjob(Job *j)
/*
* wait for job to complete or change state
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static int
j_waitj(Job *j,
/* SIGCHLD handler to reap children and update job states
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
j_sigchld(int sig)
* and state are updated, asynchronous job notification is done and,
* if unneeded, the job is removed.
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
check_job(Job *j)
/*
* Print job status in either short, medium or long format.
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
j_print(Job *j, int how, struct shf *shf)
/* Convert % sequence to job
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static Job *
j_lookup(const char *cp, int *ecodep)
/* allocate a new job and fill in the job number.
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static Job *
new_job(void)
/* Allocate new process struct
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static Proc *
new_proc(void)
/* Take job out of job_list and put old structures into free list.
* Keeps nzombies, last_job and async_job up to date.
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
remove_job(Job *j, const char *where)
async_job = NULL;
}
-/* put j in a particular location (taking it out job_list if it is there
- * already)
+/* Put j in a particular location (taking it out of job_list if it is
+ * there already)
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static void
put_job(Job *j, int where)
/* nuke a job (called when unable to start full job).
*
- * If jobs are compiled in then this routine expects sigchld to be blocked.
+ * Expects sigchld to be blocked.
*/
static int
kill_job(Job *j, int sig)