mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Assume that O_CLOEXEC is always defined and works
This commit is contained in:
@ -300,15 +300,6 @@ mtrace (void)
|
||||
mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "wce");
|
||||
if (mallstream != NULL)
|
||||
{
|
||||
#ifndef __ASSUME_O_CLOEXEC
|
||||
/* Make sure we close the file descriptor on exec. */
|
||||
int flags = __fcntl (fileno (mallstream), F_GETFD, 0);
|
||||
if (flags >= 0)
|
||||
{
|
||||
flags |= FD_CLOEXEC;
|
||||
__fcntl (fileno (mallstream), F_SETFD, flags);
|
||||
}
|
||||
#endif
|
||||
/* Be sure it doesn't malloc its buffer! */
|
||||
malloc_trace_buffer = mtb;
|
||||
setvbuf (mallstream, malloc_trace_buffer, _IOFBF, TRACE_BUFFER_SIZE);
|
||||
|
Reference in New Issue
Block a user