Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
W02jobs.ztst: huge delay if output is piped (macOS)
- X-seq: zsh-workers 54900
- From: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: W02jobs.ztst: huge delay if output is piped (macOS)
- Date: Sat, 4 Jul 2026 02:26:26 +0900
- Archived-at: <https://zsh.org/workers/54900>
- List-id: <zsh-workers.zsh.org>
On macOS (using the current git master: ref: workers/54751)
% time make TESTNUM=W02 check
make TESTNUM=W02 check 0.52s user 0.61s system 42% cpu 2.674 total
% time make TESTNUM=W02 check | cat
make TESTNUM=W02 check 0.52s user 0.61s system 41% cpu 2.703 total
cat 0.00s user 0.00s system 0% cpu 1:41.67 total
(cat takes about 100 sec longer than make)
The 'sleep 100' in the last hunk of W22jobs.ztst is not terminated (why?)
and keeps fd=12 for the pipe, and 'cat' is waiting for EOF from the pipe.
I think this fd=12 is inherited from ztst.zsh; it calls ZTST_execchunk at
line 506 with redirection, and fd=1 (the pipe) is saved in fd=12 (but why
this fd need be inherited by 'sleep'?).
The 100-sec delay does not happen if line 10 of W02jobs.ztst
zpty -w zsh 'alias sleep="sleep </dev/null >/dev/null 2>&1"'
is commented out. 'sleep 100' is terminated in this case, but lots
of 'sleep {2,3,4}' remain and causes a few-sec delay. This short delay
also happens on Linux.
It would be nice if we can cleanly terminate all the 'sleep', but if that
is not easy we can just change 'sleep 100' to, say, 'sleep 3'.
# sorry if this issue has been already discussed; I couldn't follow ML
# for about two months.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author