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

Re: using trap function to cleanup and exit?



On Sun, Apr 10, 2022, at 12:30 PM, Greg Klanderman wrote:
> With no traps of either type, should the child sleep remain after the
> script is killed by a signal?

Child processes are not automatically terminated if their parent
dies.  In general you have to handle this yourself (for example,
https://mywiki.wooledge.org/SignalTrap#When_is_the_signal_handled.3F).
I don't know if zsh has some special sauce to streamline this, as
I rarely write scripts that spawn long-running processes.

-- 
vq




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