Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] Ctrl-C stops working after process substitution
- X-seq: zsh-workers 43162
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: [BUG] Ctrl-C stops working after process substitution
- Date: Wed, 11 Jul 2018 10:48:54 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EqUGNMkkrevGJYqQbZBvCtoUkpHqvm850mS7VGHfA3U=; b=UUs2BK1hQxYodJSSMzm75DfNZ+e8r36DGhBh31jOTv9Bgx1YG7iCzM1J2QxSgOzE/s SHY1ANYah9tiJvjZGKGwx3nvRxC3xYX25HXeeA0j4fR2bkDMZGUeZ/3eiJDSpZWh/oWU ZOs/SWOVJ9hY/jIFczm0l+Cm2aVsSQraRUJdGgMTGla0F8YZxRRWco7CCtCEl2KsyOXL XpIQucpRVo2J8LnBSF+rUuGaixu7xaz2ri1jLHaZW7BjzTXoVZanT1l66FyUEqIaeb5Q 2ZGNKj6ZftnoE0wEj9keVMeKeKA+OK+FsBuF+BthHN0Y9xjM6PKFLx3oqoWBi/6Twbza 1YsA==
- In-reply-to: <CAKc7PVAusDSoe0JiHm1hB6e0iZUTo-iZnd2fBFUya=A5jTrAAQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVAkph0UJGRojp3+H2VVYOHWsTCLQo9iONh0TnuvMwL_=Q@mail.gmail.com> <1530706152.948208.1429754600.66E3F94F@webmail.messagingengine.com> <CGME20180704170810epcas5p29840028fd34c40ae2a91008f8c25eb79@epcas5p2.samsung.com> <CAKc7PVB5fd-aqgFeuTTpBU9TYUkAfcVT1+PmCGmMFJEij2azVw@mail.gmail.com> <20180705084448eucas1p244dbcec9f6d915655cd8bb035fb72f6e~_bI-T7ynp0198101981eucas1p2S@eucas1p2.samsung.com> <CAKc7PVDk1SFj8QopEZLkEo997O3NwmUP6cXRHd_4_cakSbTmLw@mail.gmail.com> <CAKc7PVBPsVJYgWmqCo=wtHNmUfQzXsb7vZzbuRH4KXig7fMcDQ@mail.gmail.com> <20180710152136eucas1p2a805a445f3687ad8a8eef97fe4bd2566~ACx3zdmM93266432664eucas1p2R@eucas1p2.samsung.com> <CAKc7PVAusDSoe0JiHm1hB6e0iZUTo-iZnd2fBFUya=A5jTrAAQ@mail.gmail.com>
Managed to find a workaround (shown at the end of email).
====== Eliminations ======
I did series of eliminations. Conclusion: it's {MYFD}< construct that
is responsible for my problem.
1. Instead of exec {MYFD}< <(...) I did: myfunct {MYFD}< <(...).
Problem still occurred.
This eliminated exec. The function is:
myfunct() { echo "$PCFD" >> /tmp/reply; }
When I add "command" before `echo', the problem disappears! (i.e.
Ctrl-C works). It is a recurring argument, that Zsh needs just a
little push to get out of this Ctrl-C stall. Running a command and not
series of builtins seems to be enough. This yielded a workaround shown
at the end of email.
2. I commented-out zle -F -w invocation. Problem still occurred.
This eliminated zle -F itself and code in zle_main.c/raw_getbyte().
3. I did cat <(...) instead of exec {MYFD}< <(...), problem didn't occur.
This eliminated <(...) as the source of problem. Also did myfunct <(...).
====== Workaround ======
Translating 1. and the `command echo' inside myfunct() into
exec-variant code, I thought that the `command echo ...' should be
placed just after the exec. The actual code (disturbed by long
debugging) is now:
exec {PCFD}< <(-fast-highlight-check-path; sleep 5)
command sleep 0
FAST_HIGHLIGHT[path-queue]+=";$_start_pos $_end_pos;"
is-at-least 5.0.6 && __pos=1 || __pos=0
zle -F ${${__pos:#0}:+-w} "$PCFD"
fast-highlight-check-path-handler
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?
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author