Fix IsProcessBackground on Linux with stdin redirection

The previous implementation assumed that stdin was a terminal.
It now checks the terminal's fd.
This commit is contained in:
greatroar
2020-10-13 12:56:23 +02:00
parent 6003dada14
commit f80b07b2c8
4 changed files with 36 additions and 15 deletions

View File

@@ -4,6 +4,6 @@ package termstatus
// IsProcessBackground reports whether the current process is running in the
// background. Not implemented for this platform.
func IsProcessBackground() bool {
func IsProcessBackground(uintptr) bool {
return false
}