From 13ef977eebd1350226c5d0374b873f941bef57bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 22 Jun 2021 20:17:58 +0200 Subject: [PATCH] =?UTF-8?q?particle:=20on-mouse:=20don=E2=80=99t=20close?= =?UTF-8?q?=20our=20own=20pipe=20FD=20before=20the=20execvp()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- particle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/particle.c b/particle.c index 16eb738..5748cce 100644 --- a/particle.c +++ b/particle.c @@ -277,7 +277,8 @@ exposable_default_on_mouse(struct exposable *exposable, struct bar *bar, /* Close *all* other FDs (e.g. script modules' FDs) */ for (int i = STDERR_FILENO + 1; i < 65536; i++) - close(i); + if (i != pipe_fds[1]) + close(i); execvp(argv[0], argv);