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

Re: Trap SIGTERM and kill running process



On Apr 5,  8:46pm, Thorsten Kampe wrote:
}
} [...]  My first attempt today was `kill 0` which 
} according to the man page should kill the current process group. It 
} worked in Bash and Z Shell but in Zsh I wasn't able to Ctrl-C a 
} `while true` loop with that trap.

Version?  I'm able to interrupt 'while true; do :; done' with a Ctrl-C
in that circumstance.  However, "kill -INT 0" did not propagate SIGINT
to a backgrounded "sleep" child, whereas "kill -TERM" was propagated.

Using -$$ instead of 0 made no difference to the SIGINT.



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