in reply to Re^3: trouble with system commands
in thread trouble with system commands
Each system() call with spaces in it results in a new instance of COMMAND.COM (or in NT-speak, CMD.EXE). It is that interpreter which takes the single string and parses it into execution. Perl wouldn't pass the "cd foo" string to perl's parent interpreter, and there is no cd.exe, so this is how it has to happen. Anything under that instance of the command interpreter has one "active directory" for each lettered device. This is lost when the command shell quits.
In Un*x, a process only sees the filesystem world as a single root, instead of several distinct lettered devices, and each process has its own current directory relative to that root.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: trouble with system commands
by ambrus (Abbot) on Dec 26, 2007 at 16:47 UTC |