On Thu, 5 Sep 2002, Andreas Raab wrote:
> So I changed this to be the image location by default. How is this
> handled on the other platforms?!
Unix has a very well-developed idea about what cwd means. Squeak behaves
the way you'd expect any Unix app to behave: it inherits the cwd from the
shell (or whatever process runs Squeak). The only thing it requires is
that the .sources (or a link thereto) be in the cwd.
Normally the cwd is the same dir as the image file, but there is nothing
at all preventing people from doing this:
ln -s some/where/SqueakV3.sources .
/some/where/else/squeak /some/where/different/squeak.image
> Can we agree on the "definite default
> working directory" for the VM to be set to the image location?!
For Unix I'd be inclined to generalize the above (i.e., the current
behaviour) rather than making it more specific (e.g., setting the cwd to
something that isn't the inherited value); for example, removing the
remaining restriction that the .sources be in the cwd, viz:
/some/where/else/squeak \
-sources /some/where/bizarre/SqueakV3.sources \
/some/where/different/squeak.image
such that the cwd can be made completely independent of the three files
the VM looks for.
Regarding where the log files get written to, the cwd at the time of
starting the VM is the right place. There is no reason to insist that
any of the VM, .sources, .image/.changes be in a writable
directory. OTOH, the logs can only be written to a writable directory
(duh ;-).
For now I don't think I should change anything. It doesn't seem to be an
issue for anyone on Unix (not one single person has ever asked if the
current behaviour might be changed). If it ain't broke, I ain't going to
even begin to speculate about the merest possibility of "fixing" it. ;)
Your solution for windows (of setting cwd to the image directory) seems
fair enough given that the .changes file will normally be in some place
writable. For Unix, such draconianism just isn't indicated (or even
desirable).
Cheers,
Ian
|