pub unsafe fn from_env() -> Option<Client> {
        let var = match env::var("CARGO_MAKEFLAGS")
            .or(env::var("MAKEFLAGS"))
            .or(env::var("MFLAGS"))
        {
            Ok(s) => s,
            Err(_) => return None,
        };
        let mut arg = "--jobserver-fds=";
        let pos = match var.find(arg) {
            Some(i) => i,
            None => {
                arg = "--jobserver-auth=";
                match var.find(arg) {
                    Some(i) => i,
                    None => return None,
                }
            }
        };

        let s = var[pos + arg.len()..].split(' ').next().unwrap();
        imp::Client::open(s).map(|c| Client { inner: Arc::new(c) })
    }
/// Attempts to connect to the jobserver specified in this process's
/// environment.
///
/// When the a `make` executable calls a child process it will configure the
/// environment of the child to ensure that it has handles to the jobserver
/// it's passing down. This function will attempt to look for these details
/// and connect to the jobserver.
///
/// Note that the created `Client` is not automatically inherited into
/// spawned child processes from this program. Manual usage of the
/// `configure` function is required for a child process to have access to a
/// job server.
///
/// # Return value
///
/// If a jobserver was found in the environment and it looks correct then
/// `Some` of the connected client will be returned. If no jobserver was
/// found then `None` will be returned.
///
/// Note that on Unix the `Client` returned **takes ownership of the file
/// descriptors specified in the environment**. Jobservers on Unix are
/// implemented with `pipe` file descriptors, and they're inherited from
/// parent processes. This `Client` returned takes ownership of the file
/// descriptors for this process and will close the file descriptors after
/// this value is dropped.
///
/// Additionally on Unix this function will configure the file descriptors
/// with `CLOEXEC` so they're not automatically inherited by spawned
/// children.
///
/// # Unsafety
///
/// This function is `unsafe` to call on Unix specifically as it
/// transitively requires usage of the `from_raw_fd` function, which is
/// itself unsafe in some circumstances.
///
/// It's recommended to call this function very early in the lifetime of a
/// program before any other file descriptors are opened. That way you can
/// make sure to take ownership properly of the file descriptors passed
/// down, if any.
///
/// It's generally unsafe to call this function twice in a program if the
/// previous invocation returned `Some`.
///
/// Note, though, that on Windows it should be safe to call this function
/// any number of times.
Attempts to connect to the jobserver specified in this process's
environment.

When the a `make` executable calls a child process it will configure the
environment of the child to ensure that it has handles to the jobserver
it's passing down. This function will attempt to look for these details
and connect to the jobserver.

Note that the created `Client` is not automatically inherited into
spawned child processes from this program. Manual usage of the
`configure` function is required for a child process to have access to a
job server.
Attempts to connect to the jobserver specified in this process ' s environment . When the a ` make ` executable calls a child process it will configure the environment of the child to ensure that it has handles to the jobserver it ' s passing down . This function will attempt to look for these details and connect to the jobserver . Note that the created ` Client ` is not automatically inherited into spawned child processes from this program . Manual usage of the ` configure ` function is required for a child process to have access to a job server .
pub unsafe fn from_env() -> Option<Client> {
        let var = match env::var("CARGO_MAKEFLAGS")
            .or(env::var("MAKEFLAGS"))
            .or(env::var("MFLAGS"))
        {
            Ok(s) => s,
            Err(_) => return None,
        };
        let mut arg = "--jobserver-fds=";
        let pos = match var.find(arg) {
            Some(i) => i,
            None => {
                arg = "--jobserver-auth=";
                match var.find(arg) {
                    Some(i) => i,
                    None => return None,
                }
            }
        };
        let s = var[pos + arg.len()..].split(' ').next().unwrap();
        imp::Client::open(s).map(|c| Client { inner: Arc::new(c) })
    }
pub unsafe fn from_env ( ) -> Option < Client > { let var = match env :: var ( " " ) . or ( env :: var ( " " ) ) . or ( env :: var ( " " ) ) { Ok ( s ) => s , Err ( _ ) => return None , } ; let mut arg = " " ; let pos = match var . find ( arg ) { Some ( i ) => i , None => { arg = " " ; match var . find ( arg ) { Some ( i ) => i , None => return None , } } } ; let s = var [ pos + arg . len ( ) .. ] . split ( ' ' ) . next ( ) . unwrap ( ) ; imp :: Client :: open ( s ) . map ( | c | Client { inner : Arc :: new ( c ) } ) }
Attempts to connect to the jobserver specified in this process's
environment.
Attempts to connect to the jobserver specified in this process ' s environment .
return value
If a jobserver was found in the environment and it looks correct then
`Some` of the connected client will be returned. If no jobserver was
found then `None` will be returned.

Note that on Unix the `Client` returned **takes ownership of the file
descriptors specified in the environment**. Jobservers on Unix are
implemented with `pipe` file descriptors, and they're inherited from
parent processes. This `Client` returned takes ownership of the file
descriptors for this process and will close the file descriptors after
this value is dropped.

Additionally on Unix this function will configure the file descriptors
with `CLOEXEC` so they're not automatically inherited by spawned
children.
If a jobserver was found in the environment and it looks correct then ` Some ` of the connected client will be returned . If no jobserver was found then ` None ` will be returned . Note that on Unix the ` Client ` returned ** takes ownership of the file descriptors specified in the environment ** . Jobservers on Unix are implemented with ` pipe ` file descriptors and they ' re inherited from parent processes . This ` Client ` returned takes ownership of the file descriptors for this process and will close the file descriptors after this value is dropped . Additionally on Unix this function will configure the file descriptors with ` CLOEXEC ` so they ' re not automatically inherited by spawned children .
unsafety
This function is `unsafe` to call on Unix specifically as it
transitively requires usage of the `from_raw_fd` function, which is
itself unsafe in some circumstances.

It's recommended to call this function very early in the lifetime of a
program before any other file descriptors are opened. That way you can
make sure to take ownership properly of the file descriptors passed
down, if any.

It's generally unsafe to call this function twice in a program if the
previous invocation returned `Some`.

Note, though, that on Windows it should be safe to call this function
any number of times.
This function is ` unsafe ` to call on Unix specifically as it transitively requires usage of the ` from_raw_fd ` function which is itself unsafe in some circumstances . It ' s recommended to call this function very early in the lifetime of a program before any other file descriptors are opened . That way you can make sure to take ownership properly of the file descriptors passed down if any . It ' s generally unsafe to call this function twice in a program if the previous invocation returned ` Some ` . Note though that on Windows it should be safe to call this function any number of times .