Re: [go-nuts] Monitoring activity stdin / stdout

2017-08-29 Thread Shawn Milochik
Perhaps you can use a TeeReader, and reset a timer each time there's activity. https://golang.org/pkg/io/#TeeReader -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email

[go-nuts] Monitoring activity stdin / stdout

2017-08-29 Thread Rich
I am trying to think of a way to monitor stdin... I have this small program that spawns a bash shell. What I am looking for is to detect inactivity package main import ( "os/exec" "os" ) func main() { shellCmd := exec.Command("/bin/bash", "-l") //shellCmd := exec.Command(mysqlBi