--- a/rust/chg/src/locator.rs Thu Oct 04 22:44:37 2018 +0900
+++ b/rust/chg/src/locator.rs Mon Nov 19 20:50:45 2018 +0900
@@ -196,6 +196,17 @@
Ok((loc, client))
})
.and_then(|(loc, client)| {
+ // It's purely optional, and the server might not support this command.
+ if client.server_spec().capabilities.contains("setprocname") {
+ let fut = client
+ .set_process_name(format!("chg[worker/{}]", loc.process_id))
+ .map(|client| (loc, client));
+ Either::A(fut)
+ } else {
+ Either::B(future::ok((loc, client)))
+ }
+ })
+ .and_then(|(loc, client)| {
client
.set_current_dir(&loc.current_dir)
.map(|client| (loc, client))