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

TRAPCHLD (was Re: segfault in completion for configure)



> > } On 2016-03-11 15:00:56 -0800, Bart Schaefer wrote:
> > } > [...] if you have a TRAPCHLD function it's
> > } > possible that it's corrupting something.

TRAPCHLD is a rather blunt instrument for what Vincent wants to do
here (update the window title with job status).  There's no reason to
update the title bar in the middle of a completion upon the exit from
a command substitution, but there's no way to tell why the CHLD signal
was delivered or what the surrounding shell state may be.

Any thoughts on ways to refine this?  Perhaps a job status change hook
instead of relying on a signal trap?

Semi-related, I've noticed that the CHLD trap is not executed when a
foreground job exits.  Presumably that's because wait() is reaping the
process before the signal is generated.



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