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:
Rob Bradford 2020-02-06 12:17:59 +00:00 committed by Sebastien Boeuf
parent 99cb8dc0a4
commit 7f032c8bb3

View File

@ -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)
}
}