1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

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:
Simon Tatham 2002-10-21 23:00:18 +00:00
parent a14e970585
commit 068da38044

View File

@ -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);