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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue