提交 e80ed3fd 编写于 作者: E Eric Blake

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.
上级 77094eaf
......@@ -570,7 +570,7 @@ __virExec(const char *const*argv,
i != null &&
i != childout &&
i != childerr &&
(!keepfd || (i < FD_SETSIZE && !FD_ISSET(i, keepfd)))) {
(!keepfd || i >= FD_SETSIZE || !FD_ISSET(i, keepfd))) {
tmpfd = i;
VIR_FORCE_CLOSE(tmpfd);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册