Make fuse command linux/MacOS only #6811
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem are we solving?
Make fuse only able on linux and macos to prevent futural platform-specific compile errors.
#6809 (comment)
This also change the signal to comply
How are we solving the problem?
This pull request refactors the
runFuse
implementation to improve platform-specific handling and updates the signal used for parent process notification in theRunMount
function. The primary changes involve splitting therunFuse
logic into platform-specific files and modifying the signal sent to the parent process.Platform-specific handling of
runFuse
:runFuse
function and its dependencies were removed fromweed/command/fuse.go
to allow for platform-specific implementations.weed/command/fuse_notsupported.go
file was added to handle cases where FUSE is not supported (e.g., non-Linux and non-Darwin platforms). It outputs an appropriate message and returns true.weed/command/fuse_std.go
file was added, containing therunFuse
implementation for Linux and Darwin platforms. This file retains the logic from the originalrunFuse
function.Signal modification in
RunMount
:RunMount
was changed fromSIGUSR1
toSIGTERM
, ensuring compatibility with the newrunFuse
implementation.How is the PR tested?
Running the following command:
No error reported.
Checks