write out hup event

master
Jordan Orelli 10 years ago
parent 6ea315ab11
commit b8bd673a31

@ -75,6 +75,7 @@ START:
fmt.Printf("ERROR: unable to write line: %v", err) fmt.Printf("ERROR: unable to write line: %v", err)
} }
case <-hup: case <-hup:
fmt.Fprintf(f, "%v HUP\n", time.Now().UnixNano())
f.Close() f.Close()
goto START goto START
} }
@ -98,7 +99,7 @@ func writePid() {
fmt.Fprintf(os.Stderr, "ERROR unable to open pidfile: %v", err) fmt.Fprintf(os.Stderr, "ERROR unable to open pidfile: %v", err)
return return
} }
fmt.Fprintf(f, "%d\n", os.Getpid()) fmt.Fprintln(f, os.Getpid())
} }
func main() { func main() {

Loading…
Cancel
Save