From 07af98f40b86633d1e71848d4c13b997231b4948 Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Mon, 25 Mar 2013 14:54:13 -0700 Subject: [PATCH] include pid in sleep response --- gracedemo/demo.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gracedemo/demo.go b/gracedemo/demo.go index 6ecdf21..80ca412 100644 --- a/gracedemo/demo.go +++ b/gracedemo/demo.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/daaku/go.grace/gracehttp" "net/http" + "os" "time" ) @@ -36,10 +37,11 @@ func newHandler(name string) http.Handler { time.Sleep(duration) fmt.Fprintf( w, - "%s started at %s slept for %d nanoseconds.\n", + "%s started at %s slept for %d nanoseconds from pid %d.\n", name, now, duration.Nanoseconds(), + os.Getpid(), ) }) return mux