Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # SIGHUP, SIGINT SIGTERM 시그널이 발생하면 cleanup 함수 실행
- trap "cleanup; exit" SIGHUP SIGINT SIGTERM
- function cleanup() {
- echo "SIGNAL input"
- }
- # 무한 루프 중 시그널이 발생하면 종료
- while [[ 1=1 ]]; do
- sleep 10
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement