Proper error handling in pipe() on Windows