rust-lang / jobserver-rs

Apache License 2.0
69 stars 40 forks source link

Validate jobserver fd more conservatively #6

Closed ishitatsuyuki closed 6 years ago

ishitatsuyuki commented 6 years ago

Background: I'm planning to write a system-wide jobserver implementation. It uses sockets, not pipe, which will be rejected with the current validation.

Reference implementation in make: https://github.com/mirror/make/blob/48c8a116a914a325a0497721f5d8b58d5bba34d4/src/posixos.c#L124

Also in the docs:

If your tool determines that the --jobserver-auth option is available in MAKEFLAGS but that the file descriptors specified are closed,

So we don't need to force them to be a pipe.

alexcrichton commented 6 years ago

Sure!