1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -05:00

Centralise calls to fcntl into functions that carefully check the

error returns.

[originally from svn r9940]
This commit is contained in:
Simon Tatham
2013-07-19 18:10:02 +00:00
parent 96f3589e16
commit b426872219
7 changed files with 76 additions and 31 deletions

View File

@ -3307,7 +3307,7 @@ void dup_session_menuitem(GtkMenuItem *item, gpointer gdata)
}
sprintf(option, "---[%d,%d]", pipefd[0], size);
fcntl(pipefd[0], F_SETFD, 0);
noncloexec(pipefd[0]);
fork_and_exec_self(inst, pipefd[1], option, NULL);
close(pipefd[0]);