From d2b58a95330c66a79fa707708a595424e6501794 Mon Sep 17 00:00:00 2001 From: Elson Wu Date: Tue, 15 May 2018 16:26:00 +0800 Subject: [PATCH] fixed the InTty does not work correctly in linux --- process.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.go b/process.go index 2a88875..094fb1f 100644 --- a/process.go +++ b/process.go @@ -194,7 +194,7 @@ func (p *Process) FullCommand() string { // InTty returns a true or false depending if p.Tty is ?? or // a value such as ttys001. func (p *Process) InTty() bool { - return p.Tty != "??" + return p.Tty[0] != "?"[0] } // OpenTty returns an opened file handle to the tty of the process.