Do only one call to GetVersionEx in the common case.
[pspp] / lib / pipe.c
index daf7f7ffeabd190e92ff4cd9f34d384c321a11ea..d17c9bf6c6c9b561dec1e6492890e6ed06d39ef1 100644 (file)
@@ -133,12 +133,12 @@ create_pipe (const char *progname,
   prog_argv = prepare_spawn (prog_argv);
 
   if (pipe_stdout)
-    if (_pipe (ifd, 4096, O_BINARY | O_NOINHERIT) < 0
+    if (pipe2 (ifd, O_BINARY | O_NOINHERIT) < 0
        || (ifd[0] = fd_safer_noinherit (ifd[0])) < 0
        || (ifd[1] = fd_safer_noinherit (ifd[1])) < 0)
       error (EXIT_FAILURE, errno, _("cannot create pipe"));
   if (pipe_stdin)
-    if (_pipe (ofd, 4096, O_BINARY | O_NOINHERIT) < 0
+    if (pipe2 (ofd, O_BINARY | O_NOINHERIT) < 0
        || (ofd[0] = fd_safer_noinherit (ofd[0])) < 0
        || (ofd[1] = fd_safer_noinherit (ofd[1])) < 0)
       error (EXIT_FAILURE, errno, _("cannot create pipe"));