diff options
Diffstat (limited to 'src/process')
| -rw-r--r-- | src/process/monitor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/process/monitor.rs b/src/process/monitor.rs index 067f3d6641..f3d90f344a 100644 --- a/src/process/monitor.rs +++ b/src/process/monitor.rs @@ -127,8 +127,10 @@ impl<C: MonitoredChild, B: ChildSpawner<C>> ChildMonitor<C, B> { let state_mutex = self.state.clone(); thread::spawn(move || { let success = child.wait().unwrap_or(false); - let mut state_lock = state_mutex.lock().unwrap(); - *state_lock = State::Stopped; + { + let mut state_lock = state_mutex.lock().unwrap(); + *state_lock = State::Stopped; + } listener(success); }) } |
