bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disowned not the job expected


From: Chet Ramey
Subject: Re: disowned not the job expected
Date: Sun, 03 Dec 2006 23:01:42 -0500
User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025)

Dan Jacobson wrote:
> Another disown adventure.
> # suspend
> [1]+  Stopped                 su
> $ emacs -f gnus fileA &
> [2] 4865
> $ disown
> bash: warning: deleting stopped job 1 with process group 3457
> $ jobs
> [2]-  Running emacs -f gnus fileA &
> 
> $ help disown
> disown: disown [-h] [-ar] [jobspec ...]
>     By default, removes each JOBSPEC argument from the table of
>     active jobs. If the -h option is given, the job is not removed
>     from the table, but is marked so that SIGHUP is not sent to the
>     job if the shell receives a SIGHUP. The -a option, when JOBSPEC is
>     not supplied, means to remove all jobs from the job table; the -r
>     option means to remove only running jobs.
> 
> But you don't mention what should happen if given no arguments!

Like bg and fg, the other commands that deal with job specs in this
fashion, disown without arguments uses the current job (the one
marked with a `+' in the output of `jobs').

The shell prefers stopped jobs to running jobs when selecting the
`current' job.  The question is whether or not that is the right
thing to do.  It wasn't what you were expecting, it seems.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]