Re: [PATCH] zsh_eval_context: add math context
Mikael Magnusson <[email protected]> Thu, 9 Jul 2026 04:03:26 +0200
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <CAHYJk3S39PSC6WK20+uG_JG2hWjKZDb1551U6X9kM-YtgUDELw@mail.gmail.com> |
On Mon, Jul 6, 2026 at 8:40 PM dana <[email protected]> wrote: > > On Mon 6 Jul 2026, at 11:20, Jun T wrote: > > If fractional seconds is allowed, sleep 0.1 seems to be enough. > > sleep isn't required to support fractional seconds, so technically we > shouldn't use them. though i think the only system we target that > doesn't support them anyway is aix > > we can use zselect if that's a concern. that's what i did in A08 > > (or we can implement sleep as a built-in. it's kind of surprising to me > that we never did that. ksh did) > > as far as fixing this specific issue, though, would this be better? > > () { : > $1 } >( read; contextfn ) > > then the read is sure to hold it open until the anonymous function > manages to write to it. right? I tried both this variant, and () { echo > $1 } >( read; contextfn ) Both pass 100% successfully with my above loop. Also double checked that the version without read still fails a bit. -- Mikael Magnusson