From dc281e46d2aceaab6a7b7a290f9af89fef46159d Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Wed, 6 May 2020 10:25:11 -0400 Subject: 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 --- widgets/terminal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/terminal.go b/widgets/terminal.go index 8fc38cea..77da71e6 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -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) -- cgit