From 4d63220e14bfb624fe133d6aa47384157a685bf7 Mon Sep 17 00:00:00 2001 From: Qi Xiao Date: Tue, 23 Feb 2016 18:22:24 +0100 Subject: [PATCH] Log stub events. Doesn't seem to work though :( --- stub/stub.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stub/stub.go b/stub/stub.go index 712ef0c0..e63bf794 100644 --- a/stub/stub.go +++ b/stub/stub.go @@ -12,6 +12,7 @@ import ( "github.com/elves/elvish/util" ) +var Logger = util.GetLogger("[stub] ") var stubname = "elvish-stub" type Stub struct { @@ -130,6 +131,7 @@ func relaySignals(reader io.Reader, sigch chan<- os.Signal) { for { var signum int _, err := fmt.Fscanf(reader, "%d", &signum) + Logger.Println("signal:", signum, err) if err != nil { sigch <- BadSignal{err} if err == io.EOF { @@ -144,6 +146,7 @@ func relaySignals(reader io.Reader, sigch chan<- os.Signal) { func wait(proc *os.Process, ch chan<- struct{}) { for { state, err := proc.Wait() + Logger.Println("wait:", state, err) if err != nil || state.Exited() { break }