diff --git a/src/unix.rs b/src/unix.rs index 25efef1..6dd9355 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -155,6 +155,14 @@ impl Client { (read_err, write_err) => { read_err?; write_err?; + + #[cfg(target_os = "linux")] + // Optimization: Try converting it to a fifo by using /dev/fd + if let Ok(Some(jobserver)) = + Self::from_fifo(&format!("/dev/fd/{}", read.as_raw_fd())) + { + return Ok(Some(jobserver)); + } } }