[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: side note to ppfChdir
Pierre Phaneuf wrote:
>> If the game wants to change directories it should be able to do that,
>> right?
>
>Yes. It should use chdir() then. But doing this isn't an optimization or
>just a handy way to shorten file names, it has side-effects on the
>system (for example, the system would be unable to unmount a CD-ROM and
Well, the game needs the cd, so it accesses it and this in turn means it is
locked. Sorry, there's nothing evil with that.
>core dumps gets created in all the wrong places, or not at all if your
>cwd is in a CD-ROM!).
Systems for "normal" users usually have ulimit -c 0 set anyway, as core
files are just a waste of space for these people.
And the people for whom it makes sense to have core dumping enabled should
be able to do a "find"...
>> As described above, doing the things without chdir () is even nastier.
>
>What? Pre-pending the "virtual cwd" inside of PFile functions (where the
>user doesn't see them) is nasty? Come on!
It at least means doing memory allocation and string copies quite
frequently.
Christian
--
Drive A: not responding...Formatting C: instead