4 ms·
POSIX compatibility > https://pubs.opengroup.org/onlinepubs/000095399/functions/open.html https://pubs.opengroup.org/onlinepubs/000095399/functions/op... > Th
by mjmas 3mo ago
POSIX compatibility
> https://pubs.opengroup.org/onlinepubs/000095399/functions/open.html 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.
- duped 3mo agoFirstly, 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