MCPcopy
hub / github.com/wavetermdev/waveterm / DoShutdown

Function DoShutdown

pkg/wshutil/wshutil.go:128–135  ·  view source on GitHub ↗
(reason string, exitCode int, quiet bool)

Source from the content-addressed store, hash-verified

126var shutdownOnce sync.Once
127
128func DoShutdown(reason string, exitCode int, quiet bool) {
129 shutdownOnce.Do(func() {
130 defer os.Exit(exitCode)
131 if !quiet && reason != "" {
132 log.Printf("shutting down: %s\n", reason)
133 }
134 })
135}
136
137func SetupPacketRpcClient(input io.Reader, output io.Writer, serverImpl ServerImpl, debugStr string) (*WshRpc, chan []byte) {
138 messageCh := make(chan baseds.RpcInputChType, DefaultInputChSize)

Callers 4

ExecuteFunction · 0.92
runListenerFunction · 0.92
serverRunRouterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected