Listen for "close" event from child processes instead of "exit".