(pipe_execv): use closefrom
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -197,6 +197,8 @@ pipe_execv(FILE **stdin_fd, FILE **stdout_fd, FILE **stderr_fd,
|
|||||||
close(err_fd[1]);
|
close(err_fd[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closefrom(2);
|
||||||
|
|
||||||
execv(file, argv);
|
execv(file, argv);
|
||||||
exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC);
|
exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC);
|
||||||
case -1:
|
case -1:
|
||||||
|
Reference in New Issue
Block a user