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

Re: Builtin + process substitution can't be interrupted



On Mar 14,  8:25am, Bart Schaefer wrote:
} Subject: Builtin + process substitution can't be interrupted
}
} Try for example
} 
} % : >(sleep 10)
} 
} Enters zwaitjob() to wait for SIGCHLD and despite dont_queue_signals() the
} INT signal is blocked, as also are QUIT and TSTP.

Update on this -- examination with a debugger indicates that although
INT is blocked, QUIT and TSTP are received.  However, they don't call
any handler and sigsuspend() just goes back to waiting for CHLD.

The INT signal is then received and processed after the child has
exited, so it's being held rather than ignored.

My current guess at what's happening is that the parent shell treats
the process substitution as part of the foreground job, and expects
that it will receive the signal and choose whether or not to exit.
However, the process substitution is not actually in the TTY process
group (it puts itself in its own group, I checked with strace), so
it never receives any signals from the keyboard.

I'm not sure where to go from there.



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