Hacker News new | ask | show | jobs
by mjmas 31 days ago
POSIX compatibility

> https://pubs.opengroup.org/onlinepubs/000095399/functions/op...

> The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.

1 comments

Firstly, standards compliance is bad when the standard is bad.

Secondly nothing precludes defining '3' as the lowest file descriptor for open(), since stdin/stdout/stderr cannot be opened (they are opened before the process starts).

nb4 open("/dev/stdin"), that's not what I mean