From a6f377258953e45f72b8f327b9028f4594eab7b3 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 1 Feb 2016 18:05:06 +0000 Subject: [PATCH] fix EOF in hupper Signed-off-by: Justin Cormack --- alpine/packages/hupper/main.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/alpine/packages/hupper/main.go b/alpine/packages/hupper/main.go index 3048cd8a0..d7e79b73b 100644 --- a/alpine/packages/hupper/main.go +++ b/alpine/packages/hupper/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "io" "io/ioutil" "log" "os" @@ -38,17 +39,14 @@ func main() { buf := make([]byte, 43) // initial state _, err = watch.Read(buf) - if err != nil { + if err != nil && err != io.EOF { log.Fatalln("Error reading watch file", err) } for { - n, err := watch.Read(buf) - if err != nil { + _, err := watch.Read(buf) + if err != nil && err != io.EOF { log.Fatalln("Error reading watch file", err) } - if n == 0 { - continue - } // a few changes eg debug do not require a daemon restart // however at present we cannot check changes, and most do restart := true