MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / stopSession

Method stopSession

modules/clibridge/clibridge.go:472–486  ·  view source on GitHub ↗
(sess *Session)

Source from the content-addressed store, hash-verified

470}
471
472func (m *CLIBridgeModule) stopSession(sess *Session) {
473 sess.mu.Lock()
474 defer sess.mu.Unlock()
475
476 if sess.Cmd.Process != nil {
477 sess.Cmd.Process.Signal(syscall.SIGTERM)
478 go func() {
479 select {
480 case <-sess.Done:
481 case <-time.After(5 * time.Second):
482 sess.Cmd.Process.Kill()
483 }
484 }()
485 }
486}

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected