From: Luboš Luňák Date: Fri, 26 Jan 2018 07:47:30 +0000 (+0100) Subject: Fix broken UNCACHED_ERR_FD X-Git-Tag: v3.3.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410f41332e1c232de74b816b078da9812a2e3024;p=thirdparty%2Fccache.git Fix broken UNCACHED_ERR_FD It shouldn't be closed on exec since that's exactly the point, to leak it to whatever ccache calls. --- diff --git a/ccache.c b/ccache.c index 3044016c2..d863a5a9d 100644 --- a/ccache.c +++ b/ccache.c @@ -3138,11 +3138,11 @@ static void setup_uncached_err(void) { int uncached_fd = dup(2); - set_cloexec_flag(uncached_fd); if (uncached_fd == -1) { cc_log("dup(2) failed: %s", strerror(errno)); failed(); } + // Leak the file descriptor. // Leak a pointer to the environment. char *buf = format("UNCACHED_ERR_FD=%d", uncached_fd);