From 410f41332e1c232de74b816b078da9812a2e3024 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 26 Jan 2018 08:47:30 +0100 Subject: [PATCH] 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. --- ccache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2