I'm not even sure what signal I should be sending with the kill
Windows has two signals, Ctrl-C and Ctrl-Break. It uses message passing primarily, but that's for application with Windows. It can terminate processes forcibly.
I think you can send the Ctrl-C and Ctrl-Break signals using kill, but I don't know which numbers do this.
kill 9 surely results in the the system call to terminate a process. That's drastic.
BUT it does not kill the gzip or mycommand processes when it gets to the "kill 9, $pid".
It kills the shell whose pid is in $pid. This doesn't kill the shell's children. I don't know one would achieve that.
One solution would be to eliminate the shell and do the piping yourself.
In reply to Re: open (to read) and kill a pipe to a pipe
by ikegami
in thread open (to read) and kill a pipe to a pipe
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |