提交 d2c48bac 编写于 作者: A aarzilli 提交者: Derek Parker

proc/gdbserial: disable foreground if /dev/tty can't be opened

Passing --stdin-path /dev/tty will crash debugserver if /dev/tty can't
be open.

Fixes #1215
上级 cc86bde5
......@@ -399,6 +399,17 @@ func LLDBLaunch(cmd []string, wd string, foreground bool) (*Process, error) {
}
}
if foreground {
// Disable foregrounding if we can't open /dev/tty or debugserver will
// crash. See issue #1215.
tty, err := os.Open("/dev/tty")
if err != nil {
foreground = false
} else {
tty.Close()
}
}
isDebugserver := false
var listener net.Listener
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册