Skip to content

Instantly share code, notes, and snippets.

@doi-t
Last active August 29, 2015 13:56
Show Gist options
  • Save doi-t/9337157 to your computer and use it in GitHub Desktop.
Save doi-t/9337157 to your computer and use it in GitHub Desktop.
straceコマンドでSIGPIPEの発生を確認する
#!/bin/sh
sleep 1
cat
#!/bin/sh
sleep 1
echo "Message from $0"
#!/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