[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait with trap SIGCHLD: different behaviour in 3.2 and 4.0
From: |
Alex Efros |
Subject: |
Re: wait with trap SIGCHLD: different behaviour in 3.2 and 4.0 |
Date: |
Mon, 28 Sep 2009 12:38:42 +0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hi!
On Sun, Sep 27, 2009 at 11:06:43PM -0400, Chet Ramey wrote:
> > Description:
> > Looks like 'wait' command in bash-4 is broken: if used together
> > with 'trap myhandler SIGCHLD' the 'wait' (without params) exit
> > just after receiving first child exit, instead of waiting for all
> > childs exit.
> Posix requires this behavior.
>
> "When the shell is waiting, by means of the wait utility, for asynchronous
> commands to complete, the reception of a signal for which a trap has been
> set shall cause the wait utility to return immediately with an exit status
> >128, immediately after which the trap associated with that signal shall be
> taken."
>
> This was reported as a bug against bash-3.2.
Cool. Is there any hint/doc/faq/how-to implement old behaviour, i.e. wait
until all children of current bash process will exit?
P.S. I've not seen this information in 'help wait' or 'man bash' - is this
current 'correct' behaviour is documented?
--
WBR, Alex.