Commit f55f607d by Tycho Andersen Committed by Stéphane Graber

sync: fail on unexpected message sizes

I think (?) this may be related to our hanging monitor bug. Let's do this anyway, as it's probably a good idea. Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
parent 3fb82baf
......@@ -47,6 +47,11 @@ static int __sync_wait(int fd, int sequence)
if (!ret)
return 0;
if (ret != sizeof(sync)) {
ERROR("unexpected sync size: %d expected %lu", ret, sizeof(sync));
return -1;
}
if (sync == LXC_SYNC_ERROR) {
ERROR("An error occurred in another process "
"(expected sequence number %d)", sequence);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment