zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Builtin + process substitution can't be interrupted
Date: Sat, 18 Mar 2017 21:15:38 -0700	[thread overview]
Message-ID: <170318211538.ZM28371@torch.brasslantern.com> (raw)
In-Reply-To: <170314082528.ZM26126@torch.brasslantern.com>

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.


      reply	other threads:[~2017-03-19  4:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 15:25 Bart Schaefer
2017-03-19  4:15 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170318211538.ZM28371@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).