|
|
@ -122,19 +122,13 @@ fn run_loop(procs: Vec<Proc>, holds: Option<i8>, poll: Poll, signals: Signals) -
|
|
|
|
// process exited
|
|
|
|
// process exited
|
|
|
|
Ok(ProcessEvent::Exit(status)) => {
|
|
|
|
Ok(ProcessEvent::Exit(status)) => {
|
|
|
|
if let Some(code) = status.code() {
|
|
|
|
if let Some(code) = status.code() {
|
|
|
|
info!(
|
|
|
|
info!("[{}] exited with code {}", &proc.app.name.yellow(), code);
|
|
|
|
"[{}] exited with code {}",
|
|
|
|
|
|
|
|
&proc.app.name.yellow(),
|
|
|
|
|
|
|
|
code
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
info!(
|
|
|
|
info!("[{}] exited with unknown code", &proc.app.name.yellow());
|
|
|
|
"[{}] exited with unknown code",
|
|
|
|
|
|
|
|
&proc.app.name.yellow()
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let hold = proc.app.hold.unwrap_or(false);
|
|
|
|
let hold = proc.app.hold.unwrap_or(false);
|
|
|
|
|
|
|
|
|
|
|
|
if proc.app.check_restart(status) {
|
|
|
|
if proc.app.check_restart(status) {
|
|
|
|
if let Ok(p) = restart_app(proc) {
|
|
|
|
if let Ok(p) = restart_app(proc) {
|
|
|
|
poll.register(&p.process, p.token, Ready::all(), PollOpt::edge())
|
|
|
|
poll.register(&p.process, p.token, Ready::all(), PollOpt::edge())
|
|
|
|