Provide the correct POSIX return value for POSIX::dup2() on Win32.
authorNicholas Clark <nick@ccl4.org>
Fri, 9 Dec 2011 12:09:07 +0000 (13:09 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 30 Dec 2011 10:55:07 +0000 (11:55 +0100)
commitad413e46537404483e9916f0c3de130b868594f7
treec353b7c29d7d2356ef32b40ce9c3e16476f2e4c6
parenta387c53a5a2f3e13850addc6976624f827a26226
Provide the correct POSIX return value for POSIX::dup2() on Win32.

Microsoft, in their wisdom, chose to ignore the POSIX spec when implementing
their dup2(), and have theirs return 0 on success, instead of the file
descriptor. It seems that no other vendor is this, um, "special", so code
the exception directly, as we don't run Configure on Win32, so there's little
point probing for this.

This resolves RT #98912.
ext/POSIX/POSIX.xs
ext/POSIX/t/posix.t