Use stdout as controlling terminal
Soves an issue with go1.15 not letting ctty be a parent. See https://github.com/creack/pty/pull/97 for more details. Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>
This commit is contained in:
parent
38a6d187b9
commit
dc281e46d2
3 changed files with 5 additions and 2 deletions
widgets
|
@ -4,6 +4,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"git.sr.ht/~sircmpwn/aerc/lib/ui"
|
||||
|
||||
|
@ -237,7 +238,7 @@ func (term *Terminal) Draw(ctx *ui.Context) {
|
|||
|
||||
if term.pty == nil {
|
||||
term.vterm.SetSize(ctx.Height(), ctx.Width())
|
||||
tty, err := pty.StartWithSize(term.cmd, &winsize)
|
||||
tty, err := pty.StartWithAttrs(term.cmd, &winsize, &syscall.SysProcAttr{Setsid: true, Setctty: true, Ctty: 1})
|
||||
term.pty = tty
|
||||
if err != nil {
|
||||
term.Close(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue