Kill a process and wait for the process to exit
No. What you can do is write a loop with kill -0 $PID. If this call fails ($? -ne 0), the process has terminated (after your normal kill): while kill -0 $PID; do sleep 1 done (kudos to qbolec for the code) Related: What does `kill -0 $pid` in a shell script do?