mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
read initial state from watchfile, should fix #17
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
2388a191f3
commit
3891dc0aef
@ -36,6 +36,11 @@ func main() {
|
||||
}
|
||||
// 43 bytes is the record size of the watch
|
||||
buf := make([]byte, 43)
|
||||
// initial state
|
||||
_, err := watch.Read(buf)
|
||||
if err != nil {
|
||||
log.Fatalln("Error reading watch file", err)
|
||||
}
|
||||
for {
|
||||
n, err := watch.Read(buf)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user