|
|
Subscribe / Log in / New account

Flags for fchmodat()

Flags for fchmodat()

Posted Jul 30, 2023 3:03 UTC (Sun) by mirabilos (subscriber, #84359)
In reply to: Flags for fchmodat() by willy
Parent article: Flags for fchmodat()

I think dup2 was actually “dup to”, and no, numbering functions by argument number totally strikes me as unusual and odd when I come by it (e.g. in jq). It’s extremely rare at least in whatever relatively broad but mostly traditional FOSS sphres I’ve been seeing.

It’s also inflexible (what if you change one argument type in a revision, or even lose one).


to post comments

Flags for fchmodat()

Posted Jul 30, 2023 3:08 UTC (Sun) by willy (subscriber, #9762) [Link] (3 responses)

You can make a similar argument that wait4 was actually "wait for"

Flags for fchmodat()

Posted Jul 30, 2023 3:20 UTC (Sun) by mirabilos (subscriber, #84359) [Link] (2 responses)

Right, fully agreed there.

I’m not too much of a fan of puns based on specific pronunciations of things, especially if they go unexplained, but it’s probably obvious to english speakers.

Flags for fchmodat()

Posted Jul 30, 2023 3:25 UTC (Sun) by willy (subscriber, #9762) [Link] (1 responses)

I'm kind of neutral on puns. If they're not needed to make sense (and dup2/wait4 are examples of that), I don't mind. The Lemmings icon of a pair of paws to mean pause is unforgivable.

Flags for fchmodat()

Posted Jul 30, 2023 9:23 UTC (Sun) by Wol (subscriber, #4433) [Link]

But puns like that is part of "the Unix way". Go back to the early versions, and Unix is absolutely full of them.

My favourite example is the mutt man page - mutts (dogs) collect mail hence the name, and "mutts don't have bugs, they have fleas ..."

Cheers,
Wol

Flags for fchmodat()

Posted Aug 3, 2023 9:00 UTC (Thu) by NYKevin (subscriber, #129325) [Link] (1 responses)

dup2() is a POSIX-ism, and it appears to be sequential since POSIX also specifies dup(). I would be surprised if Linux named dup2 and then got POSIX to adopt that name (I think dup2 is probably older than that), but I'm insufficiently familiar with the history here to categorically rule it out.

https://pubs.opengroup.org/onlinepubs/9699919799/function...

Flags for fchmodat()

Posted Aug 3, 2023 18:24 UTC (Thu) by jwilk (subscriber, #63328) [Link]

dup2() was added in V7 Unix (released in 1979), so it predates both POSIX and Linux by about a decade.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds