Skip to content

Commit

Permalink
Merge pull request #9 from acomagu/revert-8-fix-prevent-exit
Browse files Browse the repository at this point in the history
Revert "Disown the background job not to prevent exit"
  • Loading branch information
acomagu authored Apr 9, 2019
2 parents 8fbd29e + 3b1eebc commit f3f85e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions conf.d/__async_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ and begin

for func in (__async_prompt_config_functions)
__async_prompt_config_inherit_variables | __async_prompt_spawn $st 'set -l prompt ('$func'); and set -U __async_prompt_'$func'_text_'(__async_prompt_pid)' $prompt'
set -l apid (jobs -lp | tail -n1)
disown $apid # Prevent blocking exit while job is running.
function '__async_prompt_'$func'_handler' --on-process-exit $apid
function '__async_prompt_'$func'_handler' --on-process-exit (jobs -lp | tail -n1)
kill -WINCH (__async_prompt_pid)
sleep 0.1
kill -WINCH (__async_prompt_pid)
Expand Down

0 comments on commit f3f85e1

Please sign in to comment.