summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorIgor Matuszewski <igor@sequoia-pgp.org>2020-03-17 02:10:30 +0100
committerIgor Matuszewski <igor@sequoia-pgp.org>2020-03-18 17:52:40 +0100
commitff72fed0d75d3c1b7617f2a8100844db0ca37e3c (patch)
tree5c87bcb2c7072fe563c9985cd564029fe9ba3583 /ipc
parent926e1a7c0b6d1d20bdc3709c9c2147c98ba421cd (diff)
ipc: Don't clone CLI args unnecessarily for spawned server
Diffstat (limited to 'ipc')
-rw-r--r--ipc/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/src/lib.rs b/ipc/src/lib.rs
index eabb0680..5cb639ad 100644
--- a/ipc/src/lib.rs
+++ b/ipc/src/lib.rs
@@ -250,13 +250,13 @@ impl Descriptor {
let fd = l.as_raw_fd();
::std::mem::forget(l);
- Command::new(&self.executable.clone().into_os_string())
+ Command::new(&self.executable)
.arg("--home")
- .arg(self.ctx.home().to_string_lossy().into_owned())
+ .arg(self.ctx.home())
.arg("--lib")
- .arg(self.ctx.home().to_string_lossy().into_owned())
+ .arg(self.ctx.home())
.arg("--ephemeral")
- .arg(format!("{}", self.ctx.ephemeral()))
+ .arg(self.ctx.ephemeral().to_string())
// l will be closed here if the exec fails.
.stdin(unsafe { Stdio::from_raw_fd(fd) })
.stdout(Stdio::null())