Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- trap 'if [[ $? -eq 139 ]]; then echo "segfault !"; fi' CHLD
- count=0
- while :
- do
- sleep 1
- count=$(expr $count + 1)
- echo $count
- ./code >& log
- if [ "$?" -ne 139 ]
- then
- exit
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement