aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-10-12 01:35:57 -0700
committerbnewbold <bnewbold@robocracy.org>2016-10-12 01:35:57 -0700
commit5a0377cea90f03a815a72461903f77922d4246f5 (patch)
treee2914a6e35209e23f8db85a6b750e000885c0561
parent5ba5612b2049be392c8eaaac1198e509660dae3a (diff)
downloadeinhyrningsins-5a0377cea90f03a815a72461903f77922d4246f5.tar.gz
einhyrningsins-5a0377cea90f03a815a72461903f77922d4246f5.zip
shell help page
-rw-r--r--src/main.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 8699433..d2153f2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -519,6 +519,19 @@ fn main() {
exit(0);
}
+const CTRL_SHELL_USAGE: &'static str = r#"\"Command Listing:
+
+ inc increments number of children
+ dec decrements number of children
+ upgrade replaces all children with new spawns, gracefully
+ die kills all children gracefully, then exits
+ shutdown kills all children gracefully, then exits
+ signal SIG sends signal SIG to all children
+ status shows summary state of children
+ help prints this help message
+ version prints (master) version
+\"\n"#;
+
fn ctrl_socket_handle(stream: UnixStream, ctrl_req_tx: Sender<CtrlRequest>) {
let reader = BufReader::new(&stream);
let mut writer = BufWriter::new(&stream);
@@ -564,7 +577,7 @@ fn ctrl_socket_handle(stream: UnixStream, ctrl_req_tx: Sender<CtrlRequest>) {
continue;
},
Some("help") => {
- writer.write_all("\"Command Listing: <TODO>\"\n".as_bytes()).unwrap(); // TODO
+ writer.write_all(CTRL_SHELL_USAGE.as_bytes()).unwrap(); // TODO
writer.flush().unwrap();
continue;
},