[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] silent job monitor when 'set +m'
From: |
Chet Ramey |
Subject: |
Re: [PATCH] silent job monitor when 'set +m' |
Date: |
Sun, 08 Nov 2009 21:42:35 -0500 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Jeff Chua wrote:
> Revisited. The previous reply to your example works fine for interactive
> shell. But for a script (non-interactive shell), the example does not
> work the same. Job status are always reported even with "set +m" in the
> script. ...
Right. This is part of my previous answer, which you quoted:
>> Bash and historical versions of sh report the status of jobs in a script
>> that exit as the result of being killed by a signal. I'm not going to
>> change that.
This functionality predates and is independent of job control. Shells
back to at least the original Bourne shell (7th Edition) have done it.
> Is there another alternative to do this? "disown" would not work for
> situation where "wait" is used to wait for child to finish ...
Sure. Since the status messages are written to stderr, you can save
file descriptor 2 and temporarily (or permanently, depending on your
needs) redirect it to /dev/null.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/07
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/07
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/07
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/07
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/08
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/08
- Re: [PATCH] silent job monitor when 'set +m',
Chet Ramey <=
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/09
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/09
- Re: [PATCH] silent job monitor when 'set +m', Marc Herbert, 2009/11/09
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/09
- Message not available
- Re: [PATCH] silent job monitor when 'set +m', Jan Schampera, 2009/11/09
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/10
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/10
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/10
- Re: [PATCH] silent job monitor when 'set +m', Chet Ramey, 2009/11/10
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/10