On Wed, Aug 19, 2009 at 2:35 AM, Darren Duncan <dar...@darrenduncan.net>wrote:

> Having read all of this thread to date, I'll state a solution which should
> be elegant and which I'm not sure has been stated yet.

I think that's basically what we were suggesting above, except:

> (If Perl really must have the ability to change the non-virtual "current
> working directory", such as because its going to spawn another non-Perl
> process, then this should use some separate mechanism to what all of Perl's
> own IO uses, and any such change would have no effect on any Perl $*CWD.)

I would propose that whenever Perl spawns a non-Perl process, that process
automatically executes a chdir() to the spawning thread's value of $*CWD.
 But this should be done without changing the parent process's external/OS
working directory.  In UNIX that's easy - fork(), then chdir(), then exec()
- but in Windows it may be trickier.

Mark J. Reed <markjr...@gmail.com>

Reply via email to