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

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

34 * SUCH DAMAGE.
35 */
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
40#endif
41static const char rcsid[] =
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

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

34 * SUCH DAMAGE.
35 */
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
40#endif
41static const char rcsid[] =
42 "$Id: jobs.c,v 1.23 1998/09/08 13:16:52 cracauer Exp $";
42 "$Id: jobs.c,v 1.24 1999/04/21 11:52:39 cracauer Exp $";
43#endif /* not lint */
44
45#include <fcntl.h>
46#include <signal.h>
47#include <errno.h>
48#include <unistd.h>
49#include <stdlib.h>
50#include <sys/param.h>

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

688 * Under job control we have the problem that while a child process is
689 * running interrupts generated by the user are sent to the child but not
690 * to the shell. This means that an infinite loop started by an inter-
691 * active user may be hard to kill. With job control turned off, an
692 * interactive user may place an interactive program inside a loop. If
693 * the interactive program catches interrupts, the user doesn't want
694 * these interrupts to also abort the loop. The approach we take here
695 * is to have the shell ignore interrupt signals while waiting for a
43#endif /* not lint */
44
45#include <fcntl.h>
46#include <signal.h>
47#include <errno.h>
48#include <unistd.h>
49#include <stdlib.h>
50#include <sys/param.h>

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

688 * Under job control we have the problem that while a child process is
689 * running interrupts generated by the user are sent to the child but not
690 * to the shell. This means that an infinite loop started by an inter-
691 * active user may be hard to kill. With job control turned off, an
692 * interactive user may place an interactive program inside a loop. If
693 * the interactive program catches interrupts, the user doesn't want
694 * these interrupts to also abort the loop. The approach we take here
695 * is to have the shell ignore interrupt signals while waiting for a
696 * forground process to terminate, and then send itself an interrupt
696 * foreground process to terminate, and then send itself an interrupt
697 * signal if the child process was terminated by an interrupt signal.
698 * Unfortunately, some programs want to do a bit of cleanup and then
699 * exit on interrupt; unless these processes terminate themselves by
700 * sending a signal to themselves (instead of calling exit) they will
701 * confuse this approach.
702 */
703
704int

--- 449 unchanged lines hidden ---
697 * signal if the child process was terminated by an interrupt signal.
698 * Unfortunately, some programs want to do a bit of cleanup and then
699 * exit on interrupt; unless these processes terminate themselves by
700 * sending a signal to themselves (instead of calling exit) they will
701 * confuse this approach.
702 */
703
704int

--- 449 unchanged lines hidden ---