You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why hardcode /dev/tty in the init function?
I have a custom pty I want the library to work with it
case "bash":
// terminal.MakeRaw(channel.)
if !sta.enaMode {
term.Write(append(term.Escape.Red, "please enable enable\n"...))
term.Write(term.Escape.Reset)
continue
}
w := exec.Command("/usr/bin/bash")
f, fe := pty.Start(w)
Log.Println(fe)
w.SysProcAttr = &syscall.SysProcAttr{Setctty: true}
go func() {
for {
if _, e := io.Copy(f, channel); e != nil {
z <- true
break
}
}
}()
go func() {
for {
if _, e := io.Copy(channel, f); e != nil {
z <- true
break
}
}
}()
// log.Println(pc)
<-z
if w.Process.Pid > 0 {
w.Process.Kill()
}
The text was updated successfully, but these errors were encountered:
Why hardcode /dev/tty in the init function?
I have a custom pty I want the library to work with it
The text was updated successfully, but these errors were encountered: