From: Donal K. F. <don...@ma...> - 2005-10-12 21:44:09
|
Jeff Hobbs wrote: > It certainly qualifies as needing a fix, but I still wonder if it > can't be excluded in some optional way in 8.x. As I've said, it's > been naught but a source of bugs to me. I'm sure there are a few > people out there that may rely on this ... but I'd like to know > exactly why. It may also be due to the lack of dup() or similar > functions in the core. I'm happy enough with Tcl's magic when we've actually got std FDs to back them up. It's just that when they're not there, things go really horribly wrong. Perhaps the right thing to do would be to check (during library initialization, so on a per-process basis) whether each of the standard FDs is available at that point. When a FD isn't available, the magic for the corresponding std channel should be disabled (which would be data that needs to be stored in a ProcessGlobal, or something like that). Thus, if fd0 isn't there there will never be a channel called stdin (though there might be a channel called file0 or sock0, of course). How hard would it be to implement such a system? Donal. |