Created
December 13, 2014 13:29
-
-
Save kawanet/27767189e1e2f2890a08 to your computer and use it in GitHub Desktop.
bash で自プロセスが落ちたときに子プロセスも一緒に伝搬して落とす
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 | |
| trap "pkill -P $$" EXIT | |
| # do something |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment