Re: [PATCH] compinit forks less

dana <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
On Thu 30 Apr 2026, at 17:37, Bart Schaefer wrote:
> I'm not sure where you're coming up with "racy".  The same mechanism is used
> for this file as is used for =(...) substitutions.  If there's a problem
> here, there's a problem there.

there's a race between mktemp() checking whether the file exists and us
actually opening it

=( ) opens with O_EXCL so there's no security issue

${ } as sugar for >| clobbers, which is O_TRUNC, so no O_EXCL

i like your alternative. i didn't trace it (macos is garbage) but it
looks better. not sure about the fdtable question

dana
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.