(venv)➜ /tmp cat test3.sh #!/bin/bash trap handle SIGINT # run if received handle() { kill -2 $CURRENT_PID echo -en "\n Exiting Current process [$CURRENT_PID] $?\n" exit $? } python -c "while True: pass" & CURRENT_PID=$! wait "$CURRENT_PID" (venv)➜ /tmp ./test3.sh& [1] 78470 (venv)➜ /tmp kill -2 78470 Exiting Current process [78473] 0 [1] + 78470 done ./test3.sh (venv)➜ /tmp ps aux | grep python mgrigaitis 78473 99,9 0,0 2464024 3780 s000 RN 2:48 0:17.36 python -c while True: pass mgrigaitis 78481 0,0 0,0 2432772 480 s000 R+ 2:48 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn python (venv)➜ /tmp python --version Python 2.7.10