Files
gost-x/plugin/process_other.go
ginuerzh f70b114578 plugin: manage external plugin subprocess lifecycle
Add Command []string to PluginConfig and a new x/plugin package that
spawns plugin subprocesses (deduplicated by argv) and terminates them
on Shutdown. Linux uses Pdeathsig, Windows a kill-on-close job object,
so children follow an abrupt parent exit.

Wire Spawn into every config/parsing plugin constructor.
2026-09-07 17:40:20 +08:00

13 lines
330 B
Go

//go:build !linux && !windows
package plugin
import "os/exec"
// prepare and attach are no-ops on platforms without a parent-side mechanism
// to terminate the child on parent death. Children spawned here will not
// follow an abrupt parent exit (panic / kill -9).
func prepare(cmd *exec.Cmd) {}
func attach(cmd *exec.Cmd) {}