On 5/10/2026 8:27 AM, ASSI via Cygwin-patches wrote:
Mark Geisert writes:
The existing logic for open() assumes a handle is always available in
the fdtable for a created file.  This leads to a situation where, if
there is no handle available, the file is created but cannot be
referenced by a Cygwin fd.

That looks like race to me… if it need to ensure there is a handle, it
needs to reserve / create one right then and there and then use it for
the created file (and clean it up if the file can't get created due to
other errors.

True, that. I was swayed by a "but what are the odds?" argument. I will cogitate more deeply for a v2 patch; all racy logic must be avoided.
Thanks,

..mark

Reply via email to