Correct handling of child process status in 'each' command