about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-03 11:30:15 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-03 11:30:15 +0100
commit21b195562a54005b4341a037d2c02078787b7f2a (patch)
treef06c08b5f95efbe6e981d9d07bc633cbb2e8d7ef /Src
parentab6f30350a674057b364da1bd1eb4cd70073d89d (diff)
downloadzsh-21b195562a54005b4341a037d2c02078787b7f2a.tar.gz
zsh-21b195562a54005b4341a037d2c02078787b7f2a.tar.xz
zsh-21b195562a54005b4341a037d2c02078787b7f2a.zip
41043: Close pipes in shell when disowning background job.
This was missing in the case of &,, causing a file descriptor leak.
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c1
1 files changed, 1 insertions, 0 deletions
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;
 	}