mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
Adding missed details
This commit is contained in:
parent
9a204241f7
commit
50fa771c41
15
src/run.rs
15
src/run.rs
@ -196,11 +196,7 @@ impl ExecHandler {
|
|||||||
.read()
|
.read()
|
||||||
.expect("poisoned lock in has_running_process");
|
.expect("poisoned lock in has_running_process");
|
||||||
|
|
||||||
if let Some(ref _child) = *guard {
|
(*guard).is_some()
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,10 +219,11 @@ impl Handler for ExecHandler {
|
|||||||
fn on_update(&self, ops: &[PathOp]) -> Result<bool> {
|
fn on_update(&self, ops: &[PathOp]) -> Result<bool> {
|
||||||
// We have four scenarios here:
|
// We have four scenarios here:
|
||||||
//
|
//
|
||||||
// 1. Send a specified signal to the child, wait for it to exit, then run the command again
|
// 1. Just send a specified signal to the child, do nothing more
|
||||||
// 2. Send SIGTERM to the child, wait for it to exit, then run the command again
|
// 2. Just spawn a process if there are no running processes in the background
|
||||||
// 3. Just send a specified signal to the child, do nothing more
|
// 3. Send a specified signal to the child, wait for it to exit, then run the command again
|
||||||
// 4. Make sure the previous run was ended, then run the command again
|
// 4. Send SIGTERM to the child, wait for it to exit, then run the command again
|
||||||
|
// 5. Make sure the previous run was ended, then run the command again
|
||||||
//
|
//
|
||||||
let scenario = (
|
let scenario = (
|
||||||
self.args.restart,
|
self.args.restart,
|
||||||
|
Loading…
Reference in New Issue
Block a user