Conversation
Notices
-
Embed this notice
anna (navi@social.vlhl.dev)'s status on Tuesday, 01-Jul-2025 00:47:37 JST anna
honestly, *why* does `open.2` take mode as a vararg? it's so random and error prone
just have it be an argument proper, and if the user is not creating a file, pass 0- Haelwenn /элвэн/ :triskell: likes this.
-
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 01-Jul-2025 00:56:13 JST Haelwenn /элвэн/ :triskell:
@navi In fact so far all implementations I've seen ignore the argument after oflag when O_CREAT isn't passed.
So it could even be whatever value, allowing to simplify very-careful (overly-careful?) code a bit if O_CREAT gets toggled in it (like with touch vs. touch -c).