diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/handoff.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/handoff.rs b/src/server/handoff.rs index 2be36c2a..d17bfa91 100644 --- a/src/server/handoff.rs +++ b/src/server/handoff.rs @@ -80,6 +80,13 @@ pub(crate) fn spawn_handoff_import( .stdin(std::process::Stdio::null()) .stdout(std::process::Stdio::null()) .stderr(std::process::Stdio::null()); + if crate::session::explicit_session_requested() { + // The import child no longer has the original `--session` argument, so + // stale socket overrides must not mask the inherited HERDR_SESSION. + command + .env_remove(crate::api::SOCKET_PATH_ENV_VAR) + .env_remove(crate::server::socket_paths::CLIENT_SOCKET_PATH_ENV_VAR); + } crate::platform::detach_server_daemon_command(&mut command); command.spawn().map_err(|err| { io::Error::new( |
