summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorGuillaume J. Charmes <git+guillaume@charmes.net>2020-05-06 10:25:11 -0400
committerDrew DeVault <sir@cmpwn.com>2020-05-06 10:26:15 -0400
commitdc281e46d2aceaab6a7b7a290f9af89fef46159d (patch)
tree1e7979a420001163ca111fc3286f65af73e98713 /widgets
parent38a6d187b910a14ac2f74454d845fcfb24689e41 (diff)
downloadaerc-dc281e46d2aceaab6a7b7a290f9af89fef46159d.tar.gz
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>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/terminal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 8fc38ce..77da71e 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)
d='n150' href='#n150'>150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216