Interrupt Signals
Chet Ramey
chet at cwns1.INS.CWRU.Edu
Tue Oct 9 22:17:03 AEST 1990
Mark Sicignano writes:
$ I have a program that when run, fork()s, the parent exits, and
$ the child continues to run in the background.
$
$ I don't handle any signals specially. I fire up this program
$ in my .profile, but when I press ^C, my keyboard interrupt,
$ the program exits. If I run this program at my prompt, however,
$ the program does not exit when I press the ^C.
$
$ Why is this so??
Because ksh does not turn on job control until after the startup files
are read and executed. This means that all processes started from these
files are in the same process group as the shell and therefore subject
keyboard-generated signals such as SIGINT.
Chet
--
Chet Ramey ``As I recall, Doug was keen on boxing. But
Network Services Group when he learned to walk, he took up puttin'
Case Western Reserve University the boot in the groin.''
chet at ins.CWRU.Edu
More information about the Comp.unix.shell
mailing list