Commit 2967bb9c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

sockets: Use reopen_fd_as helper

It also tests for possible dup() call error.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 96f92ee6
......@@ -462,8 +462,9 @@ static int run_accept_jobs(void)
return -1;
}
dup2(fd, aj->fd);
close(fd);
if (reopen_fd_as(aj->fd, fd))
return -1;
unix_show_job("Fin acc", aj->fd, -1);
next = aj->next;
xfree(aj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment