diff options
author | Eric Blake <ebb9@byu.net> | 2009-12-07 06:53:59 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-12-07 06:55:09 -0700 |
commit | 73da5fb7e129f1fa540e040582cda710b8c2cce4 (patch) | |
tree | ffc2a62ecc40ef03a476c0923c4839bf656cb42a /modules/cloexec-tests | |
parent | b1ab442e6db76de2a7315531f6f0ec59c5934368 (diff) | |
download | gnulib-73da5fb7e129f1fa540e040582cda710b8c2cce4.tar.gz |
cloexec: preserve text vs. binary across dup_cloexec
On mingw, dup_cloexec mistakenly converted a text fd into a
binary fd. Cygwin copied the source mode. Most other platforms
don't distinguish between modes.
* lib/cloexec.c (dup_cloexec) [W32]: Query and use translation
mode.
* modules/dup2-tests (Depends-on): Add binary-io.
* modules/cloexec-tests (Depends-on): Likewise.
* tests/test-dup2.c (setmode, is_mode): New helpers.
(main): Add tests that translation mode is preserved.
* tests/test-cloexec.c (setmode, is_mode, main): Likewise.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/cloexec-tests')
-rw-r--r-- | modules/cloexec-tests | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/cloexec-tests b/modules/cloexec-tests index 38c304cf5b..22792dbacc 100644 --- a/modules/cloexec-tests +++ b/modules/cloexec-tests @@ -2,6 +2,7 @@ Files: tests/test-cloexec.c Depends-on: +binary-io configure.ac: |