feat: first-commit

This commit is contained in:
ssongliu
2022-08-17 09:37:30 +08:00
committed by ssongliu
parent c59613cf0e
commit 253015e6ff
241 changed files with 27164 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package binary
import (
"io"
"os"
"os/exec"
"github.com/1Panel-dev/1Panel/global"
)
func StartTTY() {
cmd := "gotty"
params := []string{"--permit-write", "bash"}
go func() {
c := exec.Command(cmd, params...)
c.Env = append(c.Env, os.Environ()...)
c.Stdout = io.Discard
c.Stderr = io.Discard
if err := c.Run(); err != nil {
global.LOG.Error(err)
}
}()
}