From 21b195562a54005b4341a037d2c02078787b7f2a Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 3 May 2017 11:30:15 +0100 Subject: 41043: Close pipes in shell when disowning background job. This was missing in the case of &,, causing a file descriptor leak. --- Src/exec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 9a75dd284..debb0aeca 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1612,6 +1612,7 @@ execpline(Estate state, wordcode slcode, int how, int last1) zclose(opipe[0]); } if (how & Z_DISOWN) { + pipecleanfilelist(jobtab[thisjob].filelist, 0); deletejob(jobtab + thisjob, 1); thisjob = -1; } -- cgit 1.4.1