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

Re: signal weirdness fix



Zefram wrote:
> Remember that odd behaviour I reported, that zsh thought it received a
> signal actually sent to its foreground job?
> 
> This patch limits it to SIGHUP, SIGINT and SIGQUIT, and disables this
> behaviour completely in non-interactive shells.  I think this is a good
> semantic.  Unfortunately the semantic we actually want (did the signal
> actually originate at the tty) is impossible to implement, but I think
> this is a close approximation.

The right semantic is not impossible to implement.  Actually it would
probably be quite easy for someone who fully understands zsh's process and
signal handling mechanism (unfortunately I do not understand it).  Terminal
signals are sent to all processes whose controlling terminal is the
originating tty.  The problem is that zsh waits for its child using
sigsuspend which all signals bug HUP and CHLD blocked.

There are other things which can be improved.  There is the bug described
in Etc/BUGS interrupting zsh -c 'cat a_long_file | less ; :'.  Also I think
that the pipe synchronization code can also be removed.

Zoltan



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