From b8bd673a315b3ff1e589b297e783ac2494a57cad Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Fri, 4 Jul 2014 15:55:54 +0000 Subject: [PATCH] write out hup event --- randomizr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/randomizr.go b/randomizr.go index bac22cc..bcd0a21 100644 --- a/randomizr.go +++ b/randomizr.go @@ -75,6 +75,7 @@ START: fmt.Printf("ERROR: unable to write line: %v", err) } case <-hup: + fmt.Fprintf(f, "%v HUP\n", time.Now().UnixNano()) f.Close() goto START } @@ -98,7 +99,7 @@ func writePid() { fmt.Fprintf(os.Stderr, "ERROR unable to open pidfile: %v", err) return } - fmt.Fprintf(f, "%d\n", os.Getpid()) + fmt.Fprintln(f, os.Getpid()) } func main() {