From cef9b65376a044309f74b77860ccf3c48a4ae315 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 18 Apr 2017 14:56:51 +0200 Subject: Assume that O_CLOEXEC is always defined and works --- malloc/mtrace.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'malloc/mtrace.c') diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 800f2a827a..02c53eb9fe 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -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); -- cgit 1.4.1