Overview
| Artifact ID: | 8c170d10fea621940eb20a6045bc60c2a1b06fee |
|---|---|
| Ticket: | 1343161fffffffffffffffffffffffffffffffff
exec implemenation fails to close() open file descriptors |
| User & Date: | illumino on 2008-04-07 11:05:03 |
Changes
- icomment:
Logged In: YES user_id=426773 Originator: YES Background: A third-party software vendor supplied a TCL package including a shared library which created network connections. The intended TCL/TK application which they also provided, spawned mozilla & acroread processes which survived the execution of the application (occasionally, they were there as online help resources for the application). The problems start when the application goes away and the sub-programs are left holding open sockets, which they are of course, not servicing. The server does not see that the client has exited, the fds are still open, so it buffers data for them, thinking they'll get to it soon. Problems ensue... think memory "leaks" in the server, etc ... Now the TCL/TK application needs those network connections and so the close of all open file descriptors needs to be done after the fork() or at the time of exec(). Ideally they vendor would have used FD_CLOEXEC, but honestly they aren't that bright, and unresponsive would be a polite way to put it. So being perl person (I hope you'll forgive me for that) I thought, well I'll just close them all myself in the child before starting the these helper apps. I understood it was really a vendor issue, but the Perl programmer in me, thought their should be an option on exec to handle such situations given that a TCL programmer can not manually do a fork()/close(ALL)/exec() sequence of commands as would be possible in Perl or C. Sorry I have worded thing badly and went off on a tangent, I now consider that it really is a feature request, because as has been pointed out TCL/TK does handle all its FDs correctly. I'm personally happy if the TCL team, say "well, we should not be responsible for the bad C coding of others" and close the issue. It just seemed (at the time) like a useful feature to have. My thoughts are "Won't Fix" and be done with it, but I'll leave that to the development team, may they might think its useful.
- login: "illumino"
- mimetype: "text/plain"
- username: "illumino"