1. if there's no rootfs, return -2, not 0.
2. don't close pinfd unconditionally in do_start().
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: David Ward <david.ward@ll.mit.edu>
int ret, fd;
if (rootfs == NULL || strlen(rootfs) == 0)
- return 0;
+ return -2;
if (!realpath(rootfs, absrootfs)) {
SYSERROR("failed to get real path for '%s'", rootfs);
lxc_sync_fini_parent(handler);
/* don't leak the pinfd to the container */
- close(handler->pinfd);
+ if (handler->pinfd >= 0)
+ close(handler->pinfd);
/* Tell the parent task it can begin to configure the
* container and wait for it to finish