diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-01-17 21:14:28 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-01-17 21:14:28 +0300 |
commit | e0e6a4bf49f7eea097fc6ff1f7221d116739622d (patch) | |
tree | f31e926b3ae1352a4e6c6a0f6378b4a9b7128ef0 /internal/worker.zsh | |
parent | aa0f435d75620544fb477052ff2fce8ed5e16aef (diff) |
cleanup
Diffstat (limited to 'internal/worker.zsh')
-rw-r--r-- | internal/worker.zsh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/worker.zsh b/internal/worker.zsh index d0c5d321..1537ef54 100644 --- a/internal/worker.zsh +++ b/internal/worker.zsh @@ -214,15 +214,15 @@ function _p9k_worker_start() { trace= local fifo=$_p9k__worker_file_prefix.fifo - local cmd=' - emulate zsh - { mkfifo '${(q)fifo}' && exec >&4 && echo -n "s$$\x1e" && exec 0<'${(q)fifo}' || exit } always { rm -f '${(q)fifo}' } - IFS= read -rd $'\''\x1e'\'' && eval $REPLY' + local cmd=( + 'emulate zsh' + '{ mkfifo '${(q)fifo}' && exec >&4 && echo -n "s$$\x1e" && exec 0<'${(q)fifo}' || exit } always { rm -f '${(q)fifo}' }' + 'IFS= read -rd $'\''\x1e'\'' && eval $REPLY') local setsid=${commands[setsid]:-/usr/local/opt/util-linux/bin/setsid} [[ -x $setsid ]] && setsid=${(q)setsid} || setsid= local zsh=${${:-/proc/self/exe}:A} [[ -x $zsh ]] || zsh=zsh - cmd="$setsid ${(q)zsh} --nobgnice --noaliases -${trace}dfc ${(q)cmd} &!" + cmd="$setsid ${(q)zsh} --nobgnice --noaliases -${trace}dfc ${(q)${(j:; :)cmd}} &!" sysopen -r -o cloexec -u _p9k__worker_resp_fd <( $zsh --nobgnice --noaliases -${trace}dfmc $cmd </dev/null 4>&1 &>>$log_file &!) || return zle -F $_p9k__worker_resp_fd _p9k_worker_receive |