Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
stabbles
63 days ago
|
parent
|
context
|
favorite
| on:
Moving beyond fork() + exec()
Isn't that covered by O_CLOEXEC?
sanderjd
63 days ago
|
next
[–]
I think it is error prone to need to iterate file descriptors and set this in order to inherit nothing. Excluding by default would make sense IMO.
anarazel
63 days ago
|
prev
[–]
There's a bunch of nastiness around that too. If you have e.g. library state that assumes the fd still works you can get her very confusing bugs once another file is opened into that fd number...
JdeBP
63 days ago
|
parent
[–]
You may be mixing up fork and exec. Library data state isn't retained over execve(), and O_CLOEXEC does not take effect at fork().
anarazel
63 days ago
|
root
|
parent
[–]
Indeed. Not enough coffee, apparently.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: