initialize errev fd

it can not be 0, 0 is an useful fd, this will cause weird
closing of ptmx fd.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
This commit is contained in:
Gao feng
2015-10-23 23:27:53 +08:00
parent cff19ec212
commit 7843001aa7
+2
View File
@@ -226,6 +226,7 @@ static int hyper_parse_container(struct hyper_pod *pod, struct hyper_container *
c->exec.init = 1;
c->exec.code = -1;
c->exec.e.fd = -1;
c->exec.errev.fd = -1;
c->exec.ptyfd = -1;
c->exec.errfd = -1;
c->ns = -1;
@@ -617,6 +618,7 @@ realloc:
exec->ptyfd = -1;
exec->errfd = -1;
exec->e.fd = -1;
exec->errev.fd = -1;
INIT_LIST_HEAD(&exec->list);
for (i = 0, j = 0; i < n; i++) {