Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/worker.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function _p9k_worker_main() {
# usage: _p9k_worker_async <work> <callback>
function _p9k_worker_async() {
local fd async=$1
Copy link

@ryder-gillen-ltk ryder-gillen-ltk Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you wait outside of cloexec you have turned the asynchronous worker into an synchronous one.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. The fix is wrong but the issue is legit--or at least I don't see why it wouldn't be just from the description. Do you also experience it?

sysopen -r -o cloexec -u fd <(() { eval $async; } && print -n '\x1e') || return
(print -n '\x1e' &)
pid=$!
wait $pid || return 1
(( ++_p9k_worker_inflight[$_p9k_worker_request_id] ))
_p9k_worker_fds[$fd]=$_p9k_worker_request_id$'\x1f'$2
}
Expand Down