zsh-workers
 help / color / mirror / code / Atom feed
* Builtin + process substitution can't be interrupted
@ 2017-03-14 15:25 Bart Schaefer
  2017-03-19  4:15 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2017-03-14 15:25 UTC (permalink / raw)
  To: zsh-workers

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.

This doesn't happen if the command is an external one, but that's because
(I believe) the external command receives the INT and wakes up the parent
by exiting.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Builtin + process substitution can't be interrupted
  2017-03-14 15:25 Builtin + process substitution can't be interrupted Bart Schaefer
@ 2017-03-19  4:15 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2017-03-19  4:15 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-19  4:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 15:25 Builtin + process substitution can't be interrupted Bart Schaefer
2017-03-19  4:15 ` Bart Schaefer

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).