Deal with process termination