summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-02-23 10:34:40 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-02-23 10:37:06 -0800
commita39fbed3848c76b88c731bcee72260d2b089b878 (patch)
treee52e244b4a860be16f63c78f5122dbf151b8b82c /m4
parent2f1a88d40779d4149a9655723063c0ccc551cfcc (diff)
downloadgnulib-a39fbed3848c76b88c731bcee72260d2b089b878.tar.gz
dup2: doc and test for Android bug
Reported by Kevin Cernekee in: http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00125.html * doc/posix-functions/dup2.texi (dup2): Document the bug. * m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.
Diffstat (limited to 'm4')
-rw-r--r--m4/dup2.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 28dbe0afb1..59028e0982 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 23
+#serial 24
dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -45,7 +45,7 @@ AC_DEFUN([gl_FUNC_DUP2],
if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
result |= 1;
#endif
- if (dup2 (1, 1) == 0)
+ if (dup2 (1, 1) != 1)
result |= 2;
#ifdef FD_CLOEXEC
if (fcntl (1, F_GETFD) != FD_CLOEXEC)