Conversation
|
@copilot apply the changes to other examples contained in |
|
@ubnt-intrepid I've opened a new pull request, #259, to work on those changes. Once the pull request is ready, I'll request review from you. |
2b53659 to
e041e34
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the signal handling and unmounting behavior for FUSE mounts. The changes move from automatic unmounting via Drop to explicit signal-based unmounting, requiring users to manually handle mount cleanup after receiving interruption signals.
Key changes:
- Removes
AUTO_UNMOUNTas the defaultFuseFlagsbehavior - Removes
Dropimplementation fromMountstruct - Adds signal handling using the
signal-hookcrate to detect SIGHUP, SIGTERM, and SIGINT - Updates all examples to use scoped threads with explicit mount handle cleanup
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mount.rs | Adds signal handling infrastructure, removes auto-unmount default and Drop impl, adds unmount_after_interrupted() method |
| examples/poll.rs | Updates to use explicit signal-based unmounting pattern with thread scopes |
| examples/hello.rs | Updates to use explicit signal-based unmounting pattern with thread scopes |
| examples/heartbeat_entry.rs | Updates to use explicit signal-based unmounting pattern with thread scopes |
| examples/heartbeat.rs | Updates to use explicit signal-based unmounting pattern with thread scopes |
| examples/basic.rs | Updates to use explicit signal-based unmounting pattern with thread scopes |
| Cargo.toml | Adds signal-hook dependency and io_uring feature to rustix |
| "caught the interruption signal: {:?}", | ||
| rustix::io_uring::Signal::from_named_raw(sig) |
There was a problem hiding this comment.
The rustix::io_uring::Signal type is being used to format signal numbers, but io_uring is an async I/O subsystem unrelated to POSIX signals. The io_uring feature was likely added for other reasons, but this usage appears incorrect. Consider using a more appropriate signal formatting mechanism, such as directly displaying the signal number or using libc signal constants for formatting (e.g., matching against SIGHUP, SIGTERM, SIGINT directly).
| "caught the interruption signal: {:?}", | |
| rustix::io_uring::Signal::from_named_raw(sig) | |
| "caught the interruption signal: {}", | |
| match sig { | |
| SIGHUP => "SIGHUP", | |
| SIGTERM => "SIGTERM", | |
| SIGINT => "SIGINT", | |
| _ => { | |
| // Fallback: show the signal number | |
| return format!("signal {}", sig); | |
| } | |
| } |
aed8e16 to
b3cb1ba
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/mount.rs:165
- Corrected spelling of 'priviledged' to 'privileged'.
pub fn is_priviledged(&self) -> bool {
|
一旦リジェクト |
No description provided.