Use module pipe2.
authorBruno Haible <bruno@clisp.org>
Sat, 22 Aug 2009 16:58:09 +0000 (18:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 22 Aug 2009 16:58:09 +0000 (18:58 +0200)
ChangeLog
lib/pipe.c
modules/pipe

index 690febd..b8aff86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-08-22  Bruno Haible  <bruno@clisp.org>
 
+       * lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
+       * modules/pipe (Depends-on): Add pipe2.
+
+2009-08-22  Bruno Haible  <bruno@clisp.org>
+
        Tests for module 'pipe2'.
        * modules/pipe2-tests: New file.
        * tests/test-pipe2.c: New file.
index daf7f7f..d17c9bf 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"));
index 570d71d..bb1ebee 100644 (file)
@@ -15,6 +15,7 @@ exit
 fatal-signal
 gettext-h
 open
+pipe2
 spawn
 posix_spawnp
 posix_spawn_file_actions_init