summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-15 15:28:46 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-15 15:28:46 -0400
commit94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf (patch)
tree2ddc8ca200024ecca3faf0f2efffaea15e21a04f /io
parentbd25564e1e98910ed69043ed6a6f884ce60e5780 (diff)
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 'io')
-rw-r--r--io/dup3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io/dup3.c b/io/dup3.c
index 162ab4e68b..17bc88a018 100644
--- a/io/dup3.c
+++ b/io/dup3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,6 +43,7 @@ dup3 (fd, fd2, flags)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (dup3)
stub_warning (dup3)
#include <stub-tag.h>