Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
gnulib
Commits
c7054c79
Commit
c7054c79
authored
Aug 22, 2009
by
Bruno Haible
Browse files
Use module pipe2.
parent
d72a5819
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
c7054c79
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'.
lib/pipe.c
View file @
c7054c79
...
...
@@ -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
(
pipe
2
(
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
(
pipe
2
(
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"
));
...
...
modules/pipe
View file @
c7054c79
...
...
@@ -15,6 +15,7 @@ exit
fatal-signal
gettext-h
open
pipe2
spawn
posix_spawnp
posix_spawn_file_actions_init
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment