bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] silent job monitor when 'set +m'


From: Marc Herbert
Subject: Re: [PATCH] silent job monitor when 'set +m'
Date: Mon, 09 Nov 2009 18:01:18 +0000
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Chet Ramey a écrit :
>>> 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.
>>>
>> That means another subshell.
> 
> 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?





reply via email to

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