[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EOF disowns background jobs?
From: |
Chet Ramey |
Subject: |
Re: EOF disowns background jobs? |
Date: |
Wed, 11 Mar 2009 22:11:22 -0400 |
User-agent: |
Thunderbird 2.0.0.19 (Macintosh/20081209) |
Matthew Woehlke wrote:
> $ some-command &
> $ ^D
> (bash exits, leaving some-command running)
>
> Is this what is supposed to happen? Just asking because it made me go
> "huh?"; I was expecting some-command to get SIGHUP'd.
Yes, that's what's supposed to happen. How could you run daemons from
the command line otherwise?
You can use the `huponexit' shell option, but that's only in effect for
interactive login shells.
Also, by default, the shell looks for stopped jobs when it exits (or
running jobs with the `checkjobs' option enabled) and reports them.
This allows you to send them a HUP if you want.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/