mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virExec: fix logic bug
As pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=659855#c9,
commit c3568ec2
introduced a regression where we no longer close any
fd's beyond FD_SETSIZE.
* src/util/util.c (__virExec): Continue to close fd's beyond
keepfd range.
Reported by Stefan Praszalowicz.
This commit is contained in:
parent
77094eaf3a
commit
e80ed3fd3b
@ -570,7 +570,7 @@ __virExec(const char *const*argv,
|
|||||||
i != null &&
|
i != null &&
|
||||||
i != childout &&
|
i != childout &&
|
||||||
i != childerr &&
|
i != childerr &&
|
||||||
(!keepfd || (i < FD_SETSIZE && !FD_ISSET(i, keepfd)))) {
|
(!keepfd || i >= FD_SETSIZE || !FD_ISSET(i, keepfd))) {
|
||||||
tmpfd = i;
|
tmpfd = i;
|
||||||
VIR_FORCE_CLOSE(tmpfd);
|
VIR_FORCE_CLOSE(tmpfd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user