Last active
August 29, 2015 13:56
-
-
Save doi-t/9337157 to your computer and use it in GitHub Desktop.
straceコマンドでSIGPIPEの発生を確認する
This file contains 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 | |
sleep 1 | |
cat |
This file contains 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 | |
sleep 1 | |
echo "Message from $0" |
This file contains 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/bash | |
strace -o "trace.log" ./sender.sh | ./receiver.sh || echo "exit status:${PIPESTATUS[@]}" & | |
pgrep -f 'receiver.sh' | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment