From 5a0377cea90f03a815a72461903f77922d4246f5 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 12 Oct 2016 01:35:57 -0700 Subject: shell help page --- src/main.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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) { 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) { continue; }, Some("help") => { - writer.write_all("\"Command Listing: \"\n".as_bytes()).unwrap(); // TODO + writer.write_all(CTRL_SHELL_USAGE.as_bytes()).unwrap(); // TODO writer.flush().unwrap(); continue; }, -- cgit v1.2.3