🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1435

Re: Interrupt Signals

#1435
From: Chet Ramey
Date: Tue, 09 Oct 1990 12:17
22 lines
1386 bytes
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@ins.CWRU.Edu
Technical Details
Message-ID: <1990Oct9.121703.16421@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwns1!chet
References: <2267@hsi86.hsi.com.>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwns1!chet
From: chet@cwns1.INS.CWRU.Edu (Chet Ramey)
Newsgroups: comp.unix.shell
Subject: Re: Interrupt Signals
Message-ID: <1990Oct9.121703.16421@usenet.ins.cwru.edu>
Date: 9 Oct 90 12:17:03 GMT
References: <2267@hsi86.hsi.com.>
Sender: news@usenet.ins.cwru.edu
Reply-To: chet@po.CWRU.Edu
Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA)
Lines: 23