msg.msg_iovlen = iovlen;
do {
- ret = recvmsg(fd, &msg, 0);
+ ret = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
} while (ret < 0 && errno == EINTR);
if (ret < 0 || ret == 0)
return ret;
struct lxc_handler *handler = data;
__lxc_unused __do_close int data_sock0 = handler->data_sock[0],
data_sock1 = handler->data_sock[1];
- __do_close int status_fd = -EBADF;
+ __do_close int devnull_fd = -EBADF, status_fd = -EBADF;
int ret;
uid_t new_uid;
gid_t new_gid;
struct lxc_list *iterator;
uid_t nsuid = 0;
gid_t nsgid = 0;
- int devnull_fd = -1;
lxc_sync_fini_parent(handler);
}
}
- /* After this call, we are in error because this ops should not return
+ /*
+ * After this call, we are in error because this ops should not return
* as it execs.
*/
handler->ops->start(handler, handler->data);
out_warn_father:
- /* We want the parent to know something went wrong, so we return a
+ /*
+ * We want the parent to know something went wrong, so we return a
* special error code.
*/
lxc_sync_wake_parent(handler, LXC_SYNC_ERROR);
out_error:
- close_prot_errno_disarm(devnull_fd);
-
return -1;
}