Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible bug in zsh



Vincent Stemen wrote:
> -T trapsasync
> 
>     When waiting for a child, execute traps immediately.  If this option
>     is not set, traps are executed after the child exits, as specified in
>     IEEE Std 1003.2 (``POSIX.2'') This nonstandard option is useful for
>     putting guarding shells around children that block signals.  The
>     surrounding shell may kill the child or it may just return control to
>     the tty and leave the child alone, like this:
> 
>         sh -T -c "trap 'exit 1' 2 ; some-blocking-program"

Does it mean that when the shell gets SIGINT while waiting for a
programme it normally doesn't execute the trap until the wait has finally
returned succesfully, but with this option it does?  Isn't there a race
in any case?

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk



Messages sorted by: Reverse Date, Date, Thread, Author