MCPcopy Create free account
hub / github.com/compozy/agh / Process

Struct Process

internal/subprocess/process.go:81–114  ·  view source on GitHub ↗

Process manages one subprocess and its optional JSON-RPC transport.

Source from the content-addressed store, hash-verified

79
80// Process manages one subprocess and its optional JSON-RPC transport.
81type Process struct {
82 cmd *exec.Cmd
83 stdin io.WriteCloser
84 stdout io.ReadCloser
85 stderr *boundedBuffer
86 logger *slog.Logger
87
88 transport *transport
89
90 lifecycleCtx context.Context
91 cancelLifecycle context.CancelFunc
92
93 done chan struct{}
94 waitMu sync.RWMutex
95 waitErr error
96 stopRequested bool
97 stopMu sync.RWMutex
98 closeInputMu sync.Mutex
99 inputClosed bool
100
101 stateMu sync.RWMutex
102 state processState
103
104 transportErrMu sync.RWMutex
105 transportErr error
106
107 shutdownTimeout time.Duration
108 postSignalGrace time.Duration
109 shutdownReason string
110
111 healthThreshold int
112 health healthMonitor
113 processRecord *toolruntime.Handle
114}
115
116type launchRuntimeConfig struct {
117 logger *slog.Logger

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected