On Wednesday 26 March 2003 19:12, you wrote:
> Zoran Vasiljevic wrote:
> >How come nobody has noticed this so far?
> >Well, the problem starts displaying itself if you ever change
> >the current directory of the process *after* the Tcl has been
> >initialized. You need not do [cd] explicitly; some internal
> >Tcl code does that on your behalf as well.
>
> I got chastized badly for using cd in AOLserver. Something like: "Wake
> up, this is an MT app."  What internal code uses cd. Is it generally a
> bad thing to do, aside from the actual bug it uncovered?
>

You can't just avoid it. Tcl uses [cd] in some places internaly
when doing recursive directory deletions and such. Some other
code (not yours) might also do this, to. For example, to resolve
the relative filepath. List of possible hidden uses is long.

I won't say that it is a bad thing to [cd]. You just have to
know this and program accordingly (i.e. never use relative
paths, for example). But, often, you can't avoid it.

The problem with the described bug is that it also corrupts
memory which is far more dangerous. Ah, wrong OS paths are
dangerous as well... Your process does not break, but you
might affect some unwanted files/data. Hm, a bad thing really.

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/

Reply via email to