Created
March 31, 2010 05:31
-
-
Save bmizerany/349974 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Hack process to kill all of it's children when STDIN is closed | |
# Backstory here: (http://www.trapexit.org/forum/viewtopic.php?p=51315) | |
# | |
# Usage: killchildren process-that-wont-kill-children [arg1 arg2 ...] | |
(cat && kill 0) | $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment