▲ | deathanatos a day ago | |||||||
… what POSIX API gets you the open FDs? (Or even just the maximum open FD, and we'll just cause a bunch of errors closing non-existent FDs.) | ||||||||
▲ | o11c a day ago | parent [-] | |||||||
That's `sysconf(_SC_OPEN_MAX)`, but it is always an bug to close FDs you don't know the origin of. You should be specifying `O_CLOEXEC` by default if you want FDs closed automatically. | ||||||||
|