File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 33#
44# zsh-async
55#
6- # version: 1.8.0
6+ # version: 1.8.3
77# author: Mathias Fredriksson
88# url: https://github.com/mafredri/zsh-async
99#
1010
11- typeset -g ASYNC_VERSION=1.8.0
11+ typeset -g ASYNC_VERSION=1.8.3
1212# Produce debug output from zsh-async when set to 1.
1313typeset -g ASYNC_DEBUG=${ASYNC_DEBUG:- 0}
1414
@@ -563,10 +563,18 @@ async_start_worker() {
563563 fi
564564 fi
565565
566- zpty -b $worker _async_worker -p $$ $args || {
566+ # Workaround for stderr in the main shell sometimes (incorrectly) being
567+ # reassigned to /dev/null by the reassignment done inside the async
568+ # worker.
569+ # See https://github.com/mafredri/zsh-async/issues/35.
570+ integer errfd
571+ exec {errfd}>&2
572+ zpty -b $worker _async_worker -p $$ $args 2>& $errfd || {
573+ exec {errfd}>& -
567574 async_stop_worker $worker
568575 return 1
569576 }
577+ exec {errfd}>& -
570578
571579 # Re-enable it if it was enabled, for debugging.
572580 (( has_xtrace )) && setopt xtrace
You can’t perform that action at this time.
0 commit comments