projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import upstream version 1.26
[debian/tar]
/
gnu
/
dup2.c
diff --git
a/gnu/dup2.c
b/gnu/dup2.c
index 002aa84bcad599d25a54325a5184eccd1c9ff183..4d26dd0f0c3d7b85ed5843074f627a2bfcaee2fc 100644
(file)
--- a/
gnu/dup2.c
+++ b/
gnu/dup2.c
@@
-2,7
+2,7
@@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Duplicate an open file descriptor to a specified file descriptor.
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-201
0
Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-201
1
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-61,6
+61,10
@@
rpl_dup2 (int fd, int desired_fd)
errno = EBADF;
return -1;
}
errno = EBADF;
return -1;
}
+# elif !defined __linux__
+ /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
+ if (fd == desired_fd)
+ return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
# endif
result = dup2 (fd, desired_fd);
# ifdef __linux__
# endif
result = dup2 (fd, desired_fd);
# ifdef __linux__