News for hackers. Stuff that matters.
Re:Things Unix can do atomically (2010) by oguz-ismail2 on Friday February 06, 2026 @03:02AM (#46910271)
Title says Unix, renameat2 is Linux-only.
Re:Things Unix can do atomically (2010) by jasode on Friday February 06, 2026 @03:48AM (#46910522)
>Title says Unix,

You're misinterpreting the title. The author didn't intend "Unix" to literally mean only the official AT&T/TheOpenGroup UNIX® System to the exclusion of Linux.

The first sentence of "UNIX-like" makes that clear : >This is a catalog of things UNIX-like/POSIX-compliant operating systems can do atomically,

Further down, he then mentions some Linux specifics : >fcntl(fd, F_GETLK, &lock), fcntl(fd, F_SETLK, &lock), and fcntl(fd, F_SETLKW, &lock) . [...] There is a “mandatory locking” mode but Linux’s implementation is unreliable as it’s subject to a race condition.

Re:Things Unix can do atomically (2010) by monibious on Friday February 06, 2026 @05:45AM (#46911287)
But I also don't think the auther meant Things you can do in Linux but not Unix
Re:Things Unix can do atomically (2010) by jasode on Friday February 06, 2026 @06:50AM (#46911741)
>But I also don't think the auther meant Things you can do in Linux but not Unix

I wasn't claiming that. I just thought the ggp had a useful comment about renameat2() which led to gp's "correction" which wasn't 100% accurate.

IBM z/OS UNIX also has renameat2(). It doesn't have the Linux specific flag RENAME_EXCHANGE.

https://www.ibm.com/docs/en/zos/3.1.0?topic=functions-rename...

Re:Things Unix can do atomically (2010) by mghackerlady on Friday February 06, 2026 @11:17AM (#46914720)
pedantic but z/OS isn't a unix, it can just pretend to be one enough for the open group to call it one. IBM has a unix still, AIX.
Re:Things Unix can do atomically (2010) by skissane on Friday February 06, 2026 @01:23PM (#46916266)
In recent versions, z/OS has been copying lots of Linux-specific APIs (e.g. unshare [0]) in order to support the z/OS port of Kubernetes.

If Kubernetes starts using renameat2(RENAME_EXCHANGE), they could very plausibly add it.

[0] https://www.ibm.com/docs/en/zos/3.2.0?topic=csd-unshare-bpx1...

Re:Things Unix can do atomically (2010) by shawn_w on Friday February 06, 2026 @06:02AM (#46911407)
Bit rot alert: Linux doesn't even have mandatory file locks these days.

Linux-specific open file description locks could be brought up in a modern version of TFA though.

Re:Things Unix can do atomically (2010) by stephenr on Friday February 06, 2026 @07:15AM (#46911890)
Sounds like the key term then is probably this:

> POSIX-compliant

Which, FWIW, doesn't mean Linux. AFAIK there is no Linux distro that's fully compliant, even before you worry about the specifics of whether it's certified as compliant.

Re:Things Unix can do atomically (2010) by rascul on Friday February 06, 2026 @07:49AM (#46912179)
EulerOS was certified UNIX some years ago.
Re:Things Unix can do atomically (2010) by stephenr on Friday February 06, 2026 @08:02AM (#46912320)
Huh, TIL. Thanks.
Re:Things Unix can do atomically (2010) by dietr1ch on Friday February 06, 2026 @08:55AM (#46912856)
AFAIK you don't even want to be POSIX-compliant unless having a sticker means more to you than being reasonable. Most projects knowingly steer away from compliance (and certifying compliance is probably also expensive)
Re:Things Unix can do atomically (2010) by jasode on Friday February 06, 2026 @09:28AM (#46913237)
>POSIX-compliant Which, FWIW, doesn't mean Linux. AFAIK there is no Linux distro that's fully compliant

I read author's use of "POSIX-compliant" as a loose and fuzzy family category rather than an exhaustive and authoritative reference on 100% strict compliance. Therefore, the author mentioning non-100%-compliant Linux is ok.

There seems to be 2 different expectations and interpretations of what the article is about.

- (1) article is attempting to be a strict intersection of all Unix-like systems that conform to official UNIX POSIX API. I didn't think this was a reasonable interpretation since we can't be sure the author actually verified/tested other POSIX-like systems such as FreeBSD, HP-UX, IBM AIX, etc.

- (2) article is a looser union of operating systems and can also include idiosyncracies of certain systems like Linux that the author is familiar with that don't apply to all other UNIX systems. I think some readers don't realize that all the author's citations to man pages point to Linux specific urls at : https://linux.die.net/man/

The ggp's (amstan) additional comment about renameat2(,,,,RENAME_EXCHANGE) is useful info and is consistent with interpretation (2).

If the author really didn't want Linux to be lumped in with "POSIX-like", it seems he would avoid linux.die.net and instead point to something more of a UNIX standard such as: https://unix.org/apis.html

[0] Intersection vs Union: https://en.wikipedia.org/wiki/Set_(mathematics)#Intersection

Re:Things Unix can do atomically (2010) by mionhe on Friday February 06, 2026 @10:52AM (#46914325)
The slash is read as "OR" in this case.

As in: Unix-like OR POSIX-compliant

In that light, it's probably fine to not nitpick over certifications here.

Re:Things Unix can do atomically (2010) by pjmlp on Friday February 06, 2026 @09:12AM (#46913039)
Except POSIX doesn't specify some of them as happening atomically.

Many people write UNIX/POSIX without ever reading what it says.

Re:Things Unix can do atomically (2010) by bee_rider on Friday February 06, 2026 @09:28AM (#46913247)
They aren’t misinterpreting the title, the title is incorrect.
Re:Things Unix can do atomically (2010) by jasode on Friday February 06, 2026 @02:54PM (#46917350)
>, the title is incorrect.

Differing philosophies of how to interpret titles. Prescriptive vs Descriptive language.[0]

There can be different usages of the word "Unix":

#1: Unix is a UNIX(tm) System V descendent. More emphasis that the kernel needs to be UNIX. In this strict definition, you get the common reminder that "Linux is not a Unix!"

#2: "Unix" as a loose generic term for a family of o/s that looks/feels like Unix. This perspective includes using an o/s that has userland Unix utilities like cat/grep/awk. Sometimes deliberately styled as asterisk "*nix" or a suffix-qualifier "Unix-like" but often just written as a naked "Unix".

A Prescriptivist says the author's title is "incorrect". On the other hand, a Descriptivist looks at the whole content of the article -- notices the text has a lot of Linux specific info such as fcntl(,F_GETLEASE/F_SETLEASE), and every hyperlink to a man page url points to https://linux.die.net/man/ , etc -- and thus determines that the author is using "Unix"(#2) in the looser way that can include some Linux idiosyncrasies.

"Unix" instead of "*nix" as a generic term for Linux is not uncommon. Another example article where the authors use the so-called incorrect "Unix" in the title even though it's mostly discussing Linux CUPS instead of Solaris : https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems...

[0] https://en.wikipedia.org/wiki/Linguistic_prescription