Guest User

Untitled

a guest
Oct 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. trap "echo SIGTERM" SIGTERM
  4.  
  5. sleep 10 &
  6. PID=$!
  7.  
  8. while kill -0 $PID > /dev/null 2>&1; do
  9. wait $PID
  10. done
  11.  
  12. exitCode=$?
  13.  
  14. echo $exitCode
  15.  
  16. exit $exitCode
Add Comment
Please, Sign In to add comment