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

Re: [BUG] Ctrl-C stops working after process substitution



On Wed, 11 Jul 2018 10:48:54 +0200
Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> Ctrl-C works this way. The conclusion from the eliminations is that
> {MYFD}< construct is responsible for those Ctrl-C problems. Where in
> the source to look for it?

The wordcode is associated with WC_REDIR_VARID.  For the functions that
actually set up the redirection to/from MYFD, look in exec.c and search
for references to "varid" --- in particular, in addfd() in the case
where the last argument varid is not NULL.  All the relevant
calls are from the section commented as "Do io redirections" in
execcmd_exec().

If this is a "{MYFD}< <(stuff)", then the process is started from
getpipe() in the same file --- this is a special case compared with
other uses of <(...) because we don't need a file name, just an fd,
so don't need named pipes or /dev/stuff.  This happens within
spawnpipes(), which is called immediately above the chunk that does the
FD management using the newly created fd.

pws



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