fuzzer-fdmask.test was failing in Windows, when setting -close_fd_mask to a non-zero value.
I realized it was happening, because libFuzzer closes the file descriptor for stdout (1) or stderr (2) , but after that, it writes directly to stdout and stderr using the file streams stdout and stderr, which is undefined behavior. In Windows, in particular, this was making the test fail.
Instead of closing the file descriptors, I redirect the output to /dev/null on linux and nul on Windows.
Why not just use CloseFile on Posix if it works?