diff options
author | kyoheiu <kyoheiu@outlook.com> | 2022-11-28 05:32:09 +0900 |
---|---|---|
committer | kyoheiu <kyoheiu@outlook.com> | 2022-11-28 05:32:09 +0900 |
commit | e50cdbdc0e435bbac396ec4a11853ea1bd48abe5 (patch) | |
tree | 6c7700974720ecebba7484342c2dd04059a43460 /src | |
parent | 8b2e3278f036030d688001f957ab15b1b9fcd536 (diff) |
Use drop before exit()
Diffstat (limited to 'src')
-rw-r--r-- | src/state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state.rs b/src/state.rs index 02c8367..92e6d66 100644 --- a/src/state.rs +++ b/src/state.rs @@ -238,7 +238,8 @@ impl State { .spawn() .and(Ok(())) .map_err(|_| FxError::OpenItem)?; - unsafe { libc::_exit(0) }; + drop(ex); + std::process::exit(0); } }, Err(e) => Err(FxError::Nix(e.to_string())), |