Fix a few problems in fopen and freopen
commit94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf
authorUlrich Drepper <drepper@gmail.com>
Sun, 15 May 2011 19:28:46 +0000 (15 15:28 -0400)
committerUlrich Drepper <drepper@gmail.com>
Sun, 15 May 2011 19:28:46 +0000 (15 15:28 -0400)
tree2ddc8ca200024ecca3faf0f2efffaea15e21a04f
parentbd25564e1e98910ed69043ed6a6f884ce60e5780
Fix a few problems in fopen and freopen

fopen should set the FD_CLOEXEC flag if requested evenif the kernel does
not support an aotmic operation.

freopen should reuse the file descriptor for the stream.  This is
especially important for calls to change the standard streams (stin,
stdout, stderr).
ChangeLog
include/unistd.h
io/dup3.c
libio/fileops.c
libio/freopen.c
libio/freopen64.c
libio/libio.h
libio/oldfileops.c
sysdeps/unix/sysv/linux/kernel-features.h