> First things first: I found dup and dup2 in the MingW sources. Is this why it > is working out of the box when compiling from MacOS to Windows?
My explanation that it works on Windows, is that Windows decided to support
them, see for example here (where the standard syntax is somewhat deprecated):
<https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/posix-dup-dup2?view=vs-2019>
