waitpid handle interruptions