Sorry I accidentally sent the message immediately. I use this script:

catcher() {
        echo caught.
}
set -o monitor
trap catcher SIGCHLD
for (( ;; )); do
        echo sleeping.
        sleep 2s &
        echo reading.
        read -t 5
        echo ------
        echo waiting.
        wait
done

And the trap is always called every after 5 seconds when input already
times out:

sleeping.
reading.
caught.
------
waiting.
sleeping.
reading.
caught.
------
waiting.
sleeping.
reading.
...

Cheers, konsolebox


On Fri, Oct 11, 2013 at 2:47 PM, konsolebox <konsole...@gmail.com> wrote:

> Good day,
>
> It seems like starting 4.3 (beta2) bash already delays handling traps
> until read exits. Is this intended? It would be a problem if read has a
> long timeout or doesn't have a timeout at all:
>
>
>

Reply via email to