projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
isfinite: Fix for platforms where 'long double' == 'double'.
[gnulib.git]
/
lib
/
pipe.c
diff --git
a/lib/pipe.c
b/lib/pipe.c
index
eff66cf
..
b68a555
100644
(file)
--- a/
lib/pipe.c
+++ b/
lib/pipe.c
@@
-32,7
+32,16
@@
int
pipe (int fd[2])
{
int
pipe (int fd[2])
{
- return _pipe (fd, 4096, _O_BINARY);
+ /* Mingw changes fd to {-1,-1} on failure, but this violates
+ http://austingroupbugs.net/view.php?id=467 */
+ int tmp[2];
+ int result = _pipe (tmp, 4096, _O_BINARY);
+ if (!result)
+ {
+ fd[0] = tmp[0];
+ fd[1] = tmp[1];
+ }
+ return result;
}
#else
}
#else