Fixed bug in tentacles.

This commit is contained in:
Storm Dragon committed 2026-10-16 15:33:40 -04:00
1 parent 4be35fcf9c
commit 2fa9bc8724
22 files changed
+786 -648

No files matched your search

+4 -6
View File
@@ -57,9 +57,9 @@ func run(ctx context.Context, arguments []string, stdout, stderr io.Writer) (res
options := flag.NewFlagSet("cthulhu", flag.ContinueOnError)
options.SetOutput(stderr)
tentacleFile := options.String("tentacles", "", "explicit local tentacle launch list (experimental JSON)")
tentacleParent := options.String("tentacle-cgroup-parent", "auto", "delegated cgroup v2 parent for local tentacles, or auto")
tentacleParent := options.String("tentacle-cgroup-parent", "auto", "optional delegated cgroup v2 parent; auto uses CTHULHU_TENTACLE_CGROUP_PARENT or process supervision")
noTentacles := options.Bool("no-tentacles", false, "start without tentacles, ignoring saved tentacles and the local launch list")
tentacleGuardian := options.String("tentacle-guardian", "", "run the internal tentacle lifetime helper")
tentacleGuardian := options.Bool("tentacle-guardian", false, "run the internal tentacle lifetime helper")
showVersion := options.Bool("version", false, "print version and exit")
shortVersion := options.Bool("v", false, "print version and exit")
replace := options.Bool("replace", false, "stop the running Cthulhu instance before starting")
@@ -131,10 +131,8 @@ func run(ctx context.Context, arguments []string, stdout, stderr io.Writer) (res
if *preferencesUI {
return preferences.Run(ctx, os.Stdin, stdout)
}
if *tentacleGuardian != "" {
stopInput := context.AfterFunc(ctx, func() { os.Stdin.Close() })
defer stopInput()
return tentacle.RunGuardian(os.Stdin, stdout, *tentacleGuardian)
if *tentacleGuardian {
return tentacle.RunSupervisor(ctx)
}
if *ocrConfirm {
return ocrconfirm.Run(os.Stdin, stdout)