]> Savannah Git Hosting - gnulib.git/commitdiff
spawn-pipe tests: Avoid test failure on native Windows.
authorBruno Haible <bruno@clisp.org>
Thu, 4 Oct 2018 22:27:25 +0000 (00:27 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 4 Oct 2018 22:27:25 +0000 (00:27 +0200)
* tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
that fd 2 is closed.

ChangeLog
tests/test-spawn-pipe-child.c

index 8bed1b320feb3e78d84bae07066b644566ee80ea..23a27685df83aa008e07899c50d9dc78ec8e1c5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-10-04  Bruno Haible  <bruno@clisp.org>
+
+       spawn-pipe tests: Avoid test failure on native Windows.
+       * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
+       that fd 2 is closed.
+
 2018-10-04  Bruno Haible  <bruno@clisp.org>
 
        fcntl: Make it possible to namespace the defined symbol.
index 14522f5af277368ec913755ab608774da7dbca03..b5fd7cb2c3ca24a2b5a5bdcd2e9e2c7001f7f6f8 100644 (file)
@@ -98,9 +98,9 @@ main (int argc, char *argv[])
     case 1:
       /* Expect fd 2 is closed.
          But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it
-         was closed. Future POSIX will allow this, see
-         <http://austingroupbugs.net/view.php?id=173>.  */
-#if !defined __hpux
+         was closed.  Similarly on native Windows.  Future POSIX will allow
+         this, see <http://austingroupbugs.net/view.php?id=173>.  */
+#if !(defined __hpux || (defined _WIN32 && ! defined __CYGWIN__))
       ASSERT (! is_open (STDERR_FILENO));
 #endif
       break;