[systemd-devel] [RFC PATCH 1/2] Replace mkostemp+unlink with open(O_TMPFILE)

Kay Sievers kay at vrfy.org
Mon Jan 27 10:15:23 PST 2014


On Mon, Jan 27, 2014 at 6:27 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Mon, Jan 27, 2014 at 05:57:56PM +0100, Kay Sievers wrote:

>> Can we expect open(O_TMPFILE) to fail on kernels which do not support it?

>> I guess they will just silently ignore it? Then we never unlink?

> No, it is supposed to fail properly if it doesn't work. The flags were
> changed to be incompatible with old kernels. We should probably have a
> unit test for that. I have a small utility I was using for tests, I'll
> dig it up.

Oh, any idea how this works? I couldn't see any kernel code that
checks for currently unused flags and fails.

Kay


More information about the systemd-devel mailing list