From 874b4a553594e94b1b21f7f09c1c9a618a3fac78 Mon Sep 17 00:00:00 2001 From: Weihao Jiang Date: Fri, 23 May 2025 00:50:07 +0800 Subject: Ensure `weed fuse` master process exits after mounted (#6809) * Ensure fuse master process wait for mounted * Validate parent PID input in fuse command --- weed/command/mount.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'weed/command/mount.go') diff --git a/weed/command/mount.go b/weed/command/mount.go index 4fbcc0505..21e49f236 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -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-.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") -- cgit v1.2.3