in reply to Re^4: trouble with system commands
in thread trouble with system commands
No. Under DOS, there's only one current directory (per drive) which is shared with all processes.
I suspected this when I posted Re^3: trouble with system commands but wasn't sure enough to contradict you and didn't have DOS installed so I couldn't check. I stashed this node away in my TODO.
As I now have DOS 6.22 running in an emulator, I thought to finally try it. I remembered right.
I don't have perl installed under DOS. However, I've compiled a C program that does a chdir("\\") call, and when I've ran it from the command prompt, the working directory in the shell has changed. I've got the same result when the C program did system("cd \\") instead, and also when I just did command /c cd\.
Just for the record, the current drive and the working directory of all drives are shared among processes, but the environment variables aren't. Also, if you start multiple DOS boxes under windows 3.11, each box has a separate working directory, but it is shared among processes in a single dos box.
|
|---|