From 72c965ffc8612f350446b05c85ca6eba2758391e Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 14 May 2020 19:23:48 +0300 Subject: [PATCH] Close fd on error condition --- async.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/async.zsh b/async.zsh index 0ac9269..fd79080 100644 --- a/async.zsh +++ b/async.zsh @@ -569,6 +569,7 @@ async_start_worker() { # See https://github.com/mafredri/zsh-async/issues/35. exec {errfd}>&2 zpty -b $worker _async_worker -p $$ $args 2>&$errfd || { + exec {errfd}>& - async_stop_worker $worker return 1 }