diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-02-22 20:39:57 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-02-22 20:39:57 +0300 |
commit | d53a0440d0b20e267cee94893e028d8ee8f51d7e (patch) | |
tree | d3e539367ecc85ba4f6895afe10f30499a125e1d | |
parent | a0abdc63441cdf420d96837d4b39f1672b2eca00 (diff) | |
parent | d70cc3a24b15e96a0f816343f4e5104b56d2f675 (diff) |
Merge branch 'master' into zsh-api
-rw-r--r-- | internal/worker.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/worker.zsh b/internal/worker.zsh index c6820354..3918893c 100644 --- a/internal/worker.zsh +++ b/internal/worker.zsh @@ -1,7 +1,7 @@ # invoked in worker: _p9k_worker_main <pgid> function _p9k_worker_main() { mkfifo -- $_p9k__worker_file_prefix.fifo || return - echo -nE - s$'\x1e' || return + echo -nE - s$_p9k_worker_pgid$'\x1e' || return exec <$_p9k__worker_file_prefix.fifo || return zf_rm -- $_p9k__worker_file_prefix.fifo || return @@ -147,7 +147,8 @@ function _p9k_worker_receive() { ;; s) [[ -z $_p9k__worker_req_fd ]] || return - [[ -z $arg ]] || return + [[ $arg == <1-> ]] || return + _p9k__worker_pid=$arg sysopen -w -o cloexec -u _p9k__worker_req_fd $_p9k__worker_file_prefix.fifo || return local req= for req in $_p9k__worker_request_map; do @@ -198,7 +199,6 @@ function _p9k_worker_start() { } & exec =true) || return _p9k__worker_pid=$sysparams[procsubstpid] - [[ -n $_p9k__worker_pid ]] || return zle -F $_p9k__worker_resp_fd _p9k_worker_receive _p9k__worker_shell_pid=$sysparams[pid] add-zsh-hook zshexit _p9k_worker_cleanup |