Skip to content

Commit

Permalink
Close fd on error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri committed May 14, 2020
1 parent cac0987 commit 72c965f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions async.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 72c965f

Please sign in to comment.