Only some of the return paths of lxcContainerWaitForContinue will
have set errno. In other paths we need to set it manually to avoid
the caller getting a random stale errno value
* src/lxc/lxc_container.c: Set errno in lxcContainerWaitForContinue
int readLen;
readLen = saferead(control, &msg, sizeof(msg));
- if (readLen != sizeof(msg) ||
- msg != LXC_CONTINUE_MSG) {
+ if (readLen != sizeof(msg)) {
+ if (readLen >= 0)
+ errno = EIO;
+ return -1;
+ }
+ if (msg != LXC_CONTINUE_MSG) {
+ errno = EINVAL;
return -1;
}