Re: W02jobs.ztst: huge delay if output is piped (macOS)

Bart Schaefer <[email protected]> Fri, 3 Jul 2026 16:31:24 -0700
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAH+w=7ZDf5X6gU2qmujhNfm2uvOPQ0W9Tm7LuQHHuytVgFsy8Q@mail.gmail.com>
On Fri, Jul 3, 2026 at 10:44 AM Mikael Magnusson <[email protected]> wrote:
>
> % make TESTNUM=W02 check | cat
> ... test output ...
> ***********************************************
> 1 successful test script, 0 failures, 0 skipped
> ***********************************************
> make[1]: Leaving directory '/.../zsh/Test'
> [this is where the 100 second delay happens]

I tried
% make TESTNUM=W02 check | strace cat

on Ubuntu 24.04.4 and I don't see the delay.  Nor do I see any
reference to fd=12 in the "cat" child.

> I agree that there doesn't seem to be a
> reason that this sleep should be so long, though

The test needs sleep to survive long enough for the shell driving zpty
to read back the PID, send a "kill -STOP", and then attempt "fg %-"
and read the output of "jobs".  It probably doesn't need "sleep 100"
but a single-digit sleep might not be long enough.