rust-lang / jobserver-rs

Apache License 2.0
69 stars 39 forks source link

Keep file descriptors inherited by default #65

Open belovdv opened 7 months ago

belovdv commented 7 months ago

From #64:

Then jobserver is initialized from pipe, it sets cloexec, but doesn't delete environment variable which points to file descriptors. By default (unless Client::configure is used), child process will be instructed (if it uses jobserver) to access file descriptors that was closed and maybe reopened to point to other files.

This seems like a violation of IO-safety.

Either cloexec shouldn't be set or the environment variables should also be removed and only be added back via configure.


This pr is aimed to implement first option.

Concerns:

Reasons to choose first option:


Concerns:

Notes: