From 94b7cc3711b0b74c1d3ae18b9a2e019e51a8e0bf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 15 May 2011 15:28:46 -0400 Subject: 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). --- sysdeps/unix/sysv/linux/kernel-features.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/kernel-features.h') diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index c220dca..d78f101 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 1999-2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1999-2009, 2010, 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 @@ -496,6 +496,7 @@ # define __ASSUME_PIPE2 1 # define __ASSUME_EVENTFD2 1 # define __ASSUME_SIGNALFD4 1 +# define __ASSUME_DUP3 1 #endif /* Support for the accept4 syscall was added in 2.6.28. */ -- cgit v1.1