[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: |
Mon, 9 Nov 2009 14:22:37 -0500 |
> > It doesn't require a subshell to save and restore stderr.
>
> At first I thought the same. And then I read this:
>
> <http://bash-hackers.org/wiki/doku.php/snipplets/kill_bg_job_without_message>
>
> It's also useless to temporarily redirect stderr when you call the
> kill command, since the successful termination of the job, the
> termination of the kill command and the message from the shell may not
> happen at the same time. And a blind sleep after the kill would be
> just a workaround.
>
> Doesn't some permanently redirected subshell solves this race condition?
Maybe, but I don't think it's necessary. I haven't tested it, but
what's wrong with
redirect stderr
kill pid
wait pid
restore stderr
It seems to me that this sequence forces the necessary synchronicity.
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, 2009/11/08
- 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 <=
- 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
- Re: [PATCH] silent job monitor when 'set +m', Jeff Chua, 2009/11/10
- Re: [PATCH] silent job monitor when 'set +m', Pierre Gaston, 2009/11/11
- Re: [PATCH] silent job monitor when 'set +m', Pierre Gaston, 2009/11/11
- Re: [PATCH] silent job monitor when 'set +m', Pierre Gaston, 2009/11/11