mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
lxc_controller: Move closing of handshakeFd out of virLXCControllerDaemonHandshake()
Future commits will want to reuse the handshakeFd and thus it mustn't be closed in virLXCControllerDaemonHandshake(). Do the closing explicitly afterwards. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
da61e92739
commit
bfe2d857f2
@ -353,7 +353,6 @@ static int virLXCControllerDaemonHandshake(virLXCController *ctrl)
|
|||||||
_("error sending continue signal to daemon"));
|
_("error sending continue signal to daemon"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
VIR_FORCE_CLOSE(ctrl->handshakeFd);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2403,6 +2402,9 @@ virLXCControllerRun(virLXCController *ctrl)
|
|||||||
if (virLXCControllerDaemonHandshake(ctrl) < 0)
|
if (virLXCControllerDaemonHandshake(ctrl) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
/* and preemptively close handshakeFd */
|
||||||
|
VIR_FORCE_CLOSE(ctrl->handshakeFd);
|
||||||
|
|
||||||
/* We must not hold open a dbus connection for life
|
/* We must not hold open a dbus connection for life
|
||||||
* of LXC instance, since dbus-daemon is limited to
|
* of LXC instance, since dbus-daemon is limited to
|
||||||
* only a few 100 connections by default
|
* only a few 100 connections by default
|
||||||
|
Loading…
Reference in New Issue
Block a user