diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-15 15:28:46 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-05-15 15:28:46 -0400 |
commit | 94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf (patch) | |
tree | 2ddc8ca200024ecca3faf0f2efffaea15e21a04f /include | |
parent | bd25564e1e98910ed69043ed6a6f884ce60e5780 (diff) | |
download | glibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.zip glibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.tar.gz glibc-94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf.tar.bz2 |
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).
Diffstat (limited to 'include')
-rw-r--r-- | include/unistd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index 0ad2983..5014e2e 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -79,6 +79,7 @@ char *__canonicalize_directory_name_internal (__const char *__thisdir, extern int __dup (int __fd); extern int __dup2 (int __fd, int __fd2); libc_hidden_proto (__dup2) +libc_hidden_proto (dup3) extern int __execve (__const char *__path, char *__const __argv[], char *__const __envp[]); extern long int __pathconf (__const char *__path, int __name); @@ -175,6 +176,7 @@ extern int __have_sock_cloexec; SOCK_CLOEXEC. Avoid defining separate variables for all of them unless it is really necessary. */ #define __have_pipe2 __have_sock_cloexec +#define __have_dup3 __have_sock_cloexec extern int __getlogin_r_loginuid (char *name, size_t namesize) attribute_hidden; |