You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if let Some(client) = unsafe { jobserver::Client::from_env() } {
client.configure(&mut cmd);
}
Where cmd is an existing Command.
By the time you execute the command and the pre_cmd that Client::configure set up, the Client instance has already been dropped. And dropping the Client actually closes the file descriptors (which is documented in Client::from_env. So by the time the pre-command executes, the file descriptors are either closed, or worse, were opened for something else.
It seems like Client::configure should have an explicit requirement on the lifetime of the command not exceeding that of the client.
The text was updated successfully, but these errors were encountered:
If you do something like:
Where
cmd
is an existingCommand
.By the time you execute the command and the
pre_cmd
thatClient::configure
set up, theClient
instance has already been dropped. And dropping theClient
actually closes the file descriptors (which is documented inClient::from_env
. So by the time the pre-command executes, the file descriptors are either closed, or worse, were opened for something else.It seems like
Client::configure
should have an explicit requirement on the lifetime of the command not exceeding that of the client.The text was updated successfully, but these errors were encountered: