X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxpty.c;h=54ba082c3a0e6a74107a1e923c2ff1001d9a418f;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=fb1bd55a6c265c6a3a75d4fd705006233ebfb6d9;hpb=b4268722196a3d93183252584b86cbb719187a38;p=PuTTY.git diff --git a/unix/uxpty.c b/unix/uxpty.c index fb1bd55a..54ba082c 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -800,7 +800,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Conf *conf, } close(pty->master_fd); - fcntl(slavefd, F_SETFD, 0); /* don't close on exec */ + noncloexec(slavefd); dup2(slavefd, 0); dup2(slavefd, 1); dup2(slavefd, 2); @@ -938,7 +938,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Conf *conf, *backend_handle = pty; - *realhost = dupprintf("\0"); + *realhost = dupstr(""); return NULL; }