On Thursday 27 March 2003 18:51, you wrote: > +---------- On Mar 27, Zoran Vasiljevic said: > > Tcl. This solves this issue cleanly. The ultimate fix, of course, is > > to modify the Darwin realpath() to behave better. > > I wonder what you mean by "behave better". Does realpath() leave the cwd > changed? Or do you simply mean that you don't want realpath() to ever > use chdir()?
Well, I havent thought that much of what "behave better" should really mean. I understand that it might need to use chdir eventually but the Apple implementation does this *always*, no matter which path it gets fed. Other implementations, like Solaris, Linux, when feeded with "decent" absolute paths, do not attempt to chdir at all. The thing is that from the outside, everything is ok, i,e. the cwd stays the same before and after entering the function. The problem is that other threads might (and do) creep in between. All this, coupled with recent virtual filesystem changes to Tcl yield a total disaster: the application starts to break all arround. The real net effect is that *whatever* path you pass to Tcl, it eventually gets thru the realpath() and this tweaks your cwd. This is huge PITA. I'm fighting with this already for couple of days. This is how I discovered the memory trashing reported previously. The difference is that this bug is kind of Mac OSX specific, while the other is really applicable to all platforms. Cheers, Zoran -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list: http://www.aolserver.com/listserv.html List information and options: http://listserv.aol.com/
