]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/uxproxy.c
Remove the loops that close all open fds before running a
authorSimon Tatham <anakin@pobox.com>
Sun, 14 Jan 2007 13:44:07 +0000 (13:44 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 14 Jan 2007 13:44:07 +0000 (13:44 +0000)
commit32b25c13dae27bb4f485ab2d2c4737572fa28251
treed91a7bcb237f25c4ede24d86a2e05ae86a08de52
parentaf38fcbfbce7f0defc8659117c256391fb1a9b56
Remove the loops that close all open fds before running a
subprocess. They were intended to make sure the child process didn't
inherit anything embarrassing or inconvenient from us, such as the
master end of its own pty, but now we instead do this by making sure
to set all our own fds to not-FD_CLOEXEC on creation. This should
fix Debian bug #357520.

(This doesn't seem to work _quite_ right in uxproxy.c's invocation
of a local proxy command: both ends of a GTK internal pipe end up in
the child process's fd space. This appears to be another GTK 1 bug,
inasmuch as it goes away when I build with Colin's preliminary GTK 2
patch; for the moment I think leaving that pipe lying around is
probably less harmful than hampering the proxy process's ability to
use extra fds by prior arrangement with PuTTY's parent process.)

[originally from svn r7107]
unix/uxproxy.c
unix/uxpty.c