Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Functions registered with zle -F stop being run after a job finishes
- X-seq: zsh-workers 44185
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Functions registered with zle -F stop being run after a job finishes
- Date: Wed, 27 Mar 2019 19:01:54 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1553713315; bh=mweyOmuzC1SdyQ84bR+61Ku3ntgNxAg5iskTNqavWsA=; h=Subject:From:To:Date:In-Reply-To:References; b=LuvWLjQR9lQhFA2Eraa1PPDgEP5eAX1+OzZY9jBj8OSzb8TcppnllbpdB/qnvnJ64 yX5/ZrurLbiCopUwLRF49b5qMR2yjD0iSEUWGKS3ZmlePaMVYAHNKCuDHYHGeuh2O+ P8uvoRi1uId+em0yWsOPy+06y/dzsrvup7RYaZ2rfVeKasBhx63Ux9xuSK4x+gj94E ephrwqKOnFM7pGsInm7BR0Aszb1FzQG4cFTDeaNjXSBNQ+cYY7/7D/vdHZviF3VPIO 1nKBtk4kHZjFXnpuk7veOuqusn3S7hDhO0yUY5X5gYdBJoqQ1v58Xx6xn11IHJKc82 /lOtKaihFqnNw==
- In-reply-to: <681eee2a4531f27e3b553eeb18ec4e5864858b15.camel@ntlworld.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: <CAN=4vMp8fkVKWXKXop7WjEWJYxhfkK3nEq0C4V8rj76Gs2XsXg@mail.gmail.com> <681eee2a4531f27e3b553eeb18ec4e5864858b15.camel@ntlworld.com>
On Sat, 2019-03-23 at 18:30 +0000, Peter Stephenson wrote:
> > tl;dr: There appears to be a bug in zsh. When a background job finishes,
> > functions registered with zle -F stop running until the user presses a key
> > (say, [enter] or [esc]) or the shell receives a signal (any signal at all).
>
> It's going to be something like the following.
On second thoughts I don't think removing ERRFLAG_INT is a good idea ---
that won't be set in the case in question as there's no user keyboard
interrupt, and if there was one we shouldn't ignore it. Committed
the following.
pws
modified Src/Zle/zle_main.c
@@ -632,7 +632,11 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
* with all fds, then try unsetting the special ones.
*/
if (selret < 0 && !errtry) {
- errtry = 1;
+ /* Continue after irrelevant interrupt */
+ if (errno != EINTR) {
+ /* Don't trust special FDs */
+ errtry = 1;
+ }
continue;
}
if (selret == 0) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author