mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
fix EOF in hupper
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
58d2559067
commit
a6f3772589
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user