From: drew@ophelia.cs.colorado.edu (Drew Eckhardt) Subject: Re: Background processes not dying on parent exit Date: Mon, 31 Aug 1992 06:54:26 GMT
In article <1992Aug31.040048.27053@athena.mit.edu> hammond@kwhpc.caseng.com writes:
>I'm not sure if this is a shell problem or OS problem. I'll start with the
>OS....
>
>I ran a process in the background from tcsh with the ampersand (&). I would
>have expected that when I logged out of the shell that my background processes
>would have died as well, but they didn't.
This is perfectly normal.
>Is the shell responsible for killing the background processes, or, since the
No.
>shell is the parent of them and has been terminated, shouldn't the OS kill
>the processes automatically?
No.
Under csh shells, the default behavior is to set the HUP signal handler
to "ignore" for any processes started with &. Ie, there is an implied
nohup. So, when you logout, sending a HUP signal to all your children,
they're allowed to ignore it.
Bourne shells have a different behavior.
>I'm using tcsh 6.01 and linux 0.97pl2.
>
>-kwh-
>--
>Kevin W. Hammond
>hammond@kwhpc.caseng.com
>
> CASE Engineering * 575 W. Madison #1601 * Chicago, IL 60661 * (312)902-2161
-- Microsoft is responsible for propogating the evils it calls DOS and Windows, IBM for AIX (appropriately called Aches by those having to administer it), but marketing's sins don't come close to those of legal departments. Boycott AT&T for their absurd anti-BSDI lawsuit.