diff options
author | Florian Klink <flokli@flokli.de> | 2023-09-03T14·39+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-09-05T21·13+0000 |
commit | f499d2e031c100b6e1af53c8d77c045667ec1909 (patch) | |
tree | f914733205f170c4ab9bafe5f69e39181c30a826 /tvix/Cargo.lock | |
parent | f9b5fc49b123cb4db3941ee2ae9b891f5262deef (diff) |
feat(tvix/store): fix ctrl-c handling on mount command r/6557
This enables the tokio `signal` feature, and registers a ctrl_c signal handler, which will use the unmount handle to unmount in case a ctrl-c signal is received. This avoids having disconnected mountpoints when Ctrl-C'ing a `tvix-store mount` invocation. In case the filesystem is unmounted externally (via `umount /path/to/ mountpoint`), the future is waiting for the signal is never resolved and the task is stopped. Change-Id: I149f705a6cb50188177f2a6c6a5fcd77218e2a3f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9218 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/Cargo.lock')
-rw-r--r-- | tvix/Cargo.lock | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index f2c1891b7fcd..d1a31b08a590 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -2117,6 +2117,15 @@ dependencies = [ ] [[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] name = "slab" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2433,6 +2442,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", + "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.48.0", |