MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / startTty

Method startTty

internal/server/tty_linux.go:12–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func (e *KubePiServer) startTty() {
13 cmd := "gotty"
14 params := []string{"--permit-write", "unshare", "--fork", "--pid", "--mount-proc", "--mount", "bash", "init-kube.sh"}
15 go func() {
16 c := exec.Command(cmd, params...)
17 c.Env = append(os.Environ(), "KUBEPI_WEBKUBECTL_SESSION_URL="+e.localWebkubectlSessionURL())
18 c.Stdout = io.Discard
19 c.Stderr = io.Discard
20 if err := c.Run(); err != nil {
21 e.logger.Error(err)
22 }
23 }()
24}

Callers 1

bootstrapMethod · 0.95

Calls 3

ErrorMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected