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

Re: Problems with background jobs in a script.



On Aug 1,  5:18am, Dave Yost wrote:
} 
} All I'm trying to do is to get a script to recursively kill all of 
} its background processes on exit. (In my case, this should be an 
} issue only when the script is killed.)

Is there a reason that killing the process group and letting the OS
deal with propagating the signals will not work?

    TRAPEXIT() { kill -1 0 }
 
(Change -1 to whatever signal you wanted to send.)



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