зеркало из https://github.com/github/putty.git
Don't bother closing fds 0-2 before dup2ing over them; there's no
need, and it means we always have a valid open stderr. [originally from svn r2109]
This commit is contained in:
Родитель
a14e970585
Коммит
068da38044
|
@ -432,9 +432,6 @@ static char *pty_init(char *host, int port, char **realhost, int nodelay)
|
|||
}
|
||||
|
||||
close(pty_master_fd);
|
||||
close(0);
|
||||
close(1);
|
||||
close(2);
|
||||
fcntl(slavefd, F_SETFD, 0); /* don't close on exec */
|
||||
dup2(slavefd, 0);
|
||||
dup2(slavefd, 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче