[go-nuts] exec.CommandContext wrong behavior

2017-05-16 Thread yuri . shakhmatov
Hi, all. I have some code: ... func RunTimeout(c *exec.Cmd, cnl context.CancelFunc) error { defer cnl() if err := c.Start(); err != nil { return err } return c.Wait() } func main() { ctx, cnl := context.WithTimeout(context.Background(), 10*time.

[go-nuts] Goroutine leak?

2017-05-04 Thread yuri . shakhmatov
Hello, all! There is a part of code: ... // RunTimeout runs the given command with the given timeout. // If the command times out, it attempts to kill the process. func RunTimeout(c *exec.Cmd, timeout time.Duration) error { if err := c.Start(); err != nil { return err

[go-nuts] Number of OS threads used by Go runtime

2017-04-06 Thread yuri . shakhmatov
Hi all! Is there any way to count number of OS threads used by Go runtime programmatically (ie without using bash with top/ps and others)? -- Best regards, Yuri -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group an