From 07b0b212ddd9466c166a08a27469c5e83960c3c2 Mon Sep 17 00:00:00 2001 From: rasul Date: Fri, 13 Dec 2019 10:38:48 -0600 Subject: [PATCH] add a few comments --- src/run.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/run.rs b/src/run.rs index dc2fc47..cbbe36c 100644 --- a/src/run.rs +++ b/src/run.rs @@ -90,19 +90,24 @@ fn run_loop(procs: Vec, holds: Option, poll: Poll, signals: Signals) - let mut proc = procs.remove(i); match proc.process.try_recv() { + // got something on stdout or stderr Ok(ProcessEvent::Data(channel, data)) => { process_event_data(channel, data, &proc.app.name); procs.push(proc); } + // error starting or closing child process Ok(ProcessEvent::CommandError(e)) => { error!("[{}]: command error: {:?}", &proc.app.name, e) } + // error reading stdout or stderr Ok(ProcessEvent::IoError(channel, e)) => { error!("[{}]: io error on {:?}: {:?}", &proc.app.name, channel, e) } + // error doing utf8 translation Ok(ProcessEvent::Utf8Error(channel, e)) => { error!("[{}]: utf8 error on {:?}: {:?}", &proc.app.name, channel, e) } + // process exited Ok(ProcessEvent::Exit(status)) => { let hold = proc.app.hold.unwrap_or(false); if proc.app.check_restart(status) {