Ensure weed fuse master process exits after mounted (#6809)

* Ensure fuse master process wait for mounted

* Validate parent PID input in fuse command
This commit is contained in:
Weihao Jiang
2025-05-23 00:50:07 +08:00
committed by GitHub
parent 165af32d6b
commit 874b4a5535
3 changed files with 33 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ type MountOptions struct {
localSocket *string
disableXAttr *bool
extraOptions []string
fuseCommandPid int
}
var (
@@ -72,6 +73,7 @@ func init() {
mountOptions.debugPort = cmdMount.Flag.Int("debug.port", 6061, "http port for debugging")
mountOptions.localSocket = cmdMount.Flag.String("localSocket", "", "default to /tmp/seaweedfs-mount-<mount_dir_hash>.sock")
mountOptions.disableXAttr = cmdMount.Flag.Bool("disableXAttr", false, "disable xattr")
mountOptions.fuseCommandPid = 0
mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file")
mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file")