Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] zsh_eval_context: add math context



On Mon, Jul 6, 2026 at 8:40 PM dana <dana@xxxxxxx> 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




Messages sorted by: Reverse Date, Date, Thread, Author