Hi, I've noticed that a couple temp files are leaked after each full gcc test-suite run.
I'd like to fix that by the following patch. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd.
From 6ad9e8552646e6ff54981cf7102ffcb311b6860f Mon Sep 17 00:00:00 2001 From: Bernd Edlinger <bernd.edlin...@hotmail.de> Date: Fri, 14 May 2021 07:10:59 +0200 Subject: [PATCH] Cleanup temp files in libphobos unittest at src/std/process.d 2021-05-14 Bernd Edlinger <bernd.edlin...@hotmail.de> * src/std/process.d (unittest): Remove tmpname on exit. --- libphobos/src/std/process.d | 1 + 1 file changed, 1 insertion(+) diff --git a/libphobos/src/std/process.d b/libphobos/src/std/process.d index 63ec493..1e977aa 100644 --- a/libphobos/src/std/process.d +++ b/libphobos/src/std/process.d @@ -2581,6 +2581,7 @@ private auto executeImpl(alias pipeFunc, Cmd, ExtraPipeFuncArgs...)( ReturnType!executeShell r; auto tmpname = uniqueTempPath; + scope(exit) if (exists(tmpname)) remove(tmpname); auto t = stderr; // Open a new scope to minimize code ran with stderr redirected. { -- 1.9.1