Login
You're viewing the functional.cafe public feed.
  • Nov 12, 2026, 2:19 AM

    @collinfunk
    also, it seems to me what they're doing is fundamentally wrong: they're trying to implement POSIX semantics on top of a high-level filesystem API from Rust's stdlib, that AFAIK doesn't even make any promises wrt atomicity, so it might be mapping to some sequence of syscalls now and a semantically different sequence of syscalls in the future...
    @cks

    💬 1🔄 0⭐ 0

Replies

  • Nov 12, 2026, 2:29 AM

    @wolf480pl @cks I have similar concerns about that, but figured I was probably just being paranoid. I wonder how bad it would be for portability to just use rustix syscall wrappers.

    💬 1🔄 0⭐ 0
  • Nov 12, 2026, 2:40 AM

    @collinfunk @wolf480pl In my view the only time 'mkdir -p' should fail is if at the end of its work, there is no 'a/b'. People using 'mkdir -p' care about whether or not the result exists, not how it got there. (Of course it could be renamed immediately afterward before your script does anything else, but so can anything.)

    I think POSIX can be read to be more narrow than this, but if so, deviation is likely to be extremely common in mkdirs in practice.

    💬 0🔄 0⭐ 0