Hi, > I think that the kill -0 $PID should be something else, is it possible? No, that's not an issue. What "kill -0 <pid>" does is checks to see if <pid> is still alive - this is how the script prints the "waiting for <pid> to exit..." message and returns when the process has actually exited. Regards, Andy