mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 04:25:21 +00:00
bin: vhost_user_fs: Shutdown worker thread on exit
This will ensure a clean shutdown of the backend Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
99cb8dc0a4
commit
7f032c8bb3
@ -241,6 +241,10 @@ fn main() {
|
||||
|
||||
if let Err(e) = daemon.wait() {
|
||||
error!("Waiting for daemon failed: {:?}", e);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
let kill_evt = &fs_backend.read().unwrap().kill_evt;
|
||||
if let Err(e) = kill_evt.write(1) {
|
||||
error!("Error shutting down worker thread: {:?}", e)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user