From 380c51010be4cbbc498a9e6bdda0a15f98c004dd Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 25 Jan 2016 21:10:13 +0000 Subject: [PATCH] Read exactly 43 bytes from watch More and it hangs forever at present Less and it will not read whole record See https://github.com/docker/pinata/issues/766 Signed-off-by: Justin Cormack --- alpine/packages/hupper/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alpine/packages/hupper/main.go b/alpine/packages/hupper/main.go index 1de436f59..ba0a81d2a 100644 --- a/alpine/packages/hupper/main.go +++ b/alpine/packages/hupper/main.go @@ -27,7 +27,8 @@ func main() { if err != nil { log.Fatalln("Failed to open file", path, err) } - buf := make([]byte, 512) + // 43 bytes is the record size of the watch + buf := make([]byte, 43) for { _, err := watch.Read(buf) if err != nil {