Re: openat("./...", O_CREAT) fails even though the directory exists

From: Marcin Cieslak <saper_at_saper.info>
Date: Tue, 21 Oct 2025 21:11:53 UTC
On Mon, 13 Oct 2025, Lexi Winter wrote:

> after some more debugging, i think what's going on here is that pkg(8)
> is deleting and recreating /var/spool/mqueue on upgrade, which means
> smmsp's open fd to that directory is no longer valid, and therefore
> openat() returns this unusual error.

(leaving the restart discussion on a side)

I think mail spool queues should be left untouched by pkg(8). There might be some mail
there waiting to be sent.

Marcin