rust-lang / jobserver-rs

Apache License 2.0
69 stars 39 forks source link

disable jobserver on unix, if file descriptors are negative #68

Closed belovdv closed 6 months ago

belovdv commented 7 months ago

According to the GNU make manual:

If either or both of these file descriptors are negative, it means the jobserver is disabled for this process.

This pr makes so.

From https://github.com/rust-lang/rust/issues/120515.

ojeda commented 7 months ago

Thanks for solving this!

belovdv commented 6 months ago

With separated NegativeFd error kind, which has extensive comment I'd expect to see more explanations of what CannotParse error means and why doesn't it follow manual:

If your tool does not recognize the format of the --jobserver-auth string, it should assume the jobserver is using a different style and it cannot connect.

Not a part of this PR, though

weihanglo commented 6 months ago

@petrochenkov do we plan to have a release for this and #67?

petrochenkov commented 6 months ago

@weihanglo Anything else non-controversial needs to go into the release? https://github.com/rust-lang/jobserver-rs/pull/57 maybe?

weihanglo commented 6 months ago

@petrochenkov Added comments to #57. I am fine with either way :)