Re: popen() and virtual dir

From: Date: Sat, 10 Jun 2000 18:10:39 +0000
Subject: Re: popen() and virtual dir
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-20959@lists.php.net to get a copy of this message
At 11:08 AM 6/10/00 -0700, Rasmus Lerdorf wrote:
What do you guys want to do with popen() and virtual_dir? This effects all of the exec() functions. We can either do a real chdir() before calling it and mutexing the whole section; or we can take a more complicated approach of creating a new process and doing the chdir() there. Last but not least, we could just disable these functions :) Well, disabling them is not really an option. As for creating a new process and doing a chdir() there. These functions already create a new process. Would something like: popen("cd /path; cmd") do the trick? ie. prepend the virtual_dir chdir to the cmd string we pass to these functions. The chdir should be isolated to the spawned process.
That sounds like a good idea! It might actually work. The question is, how do you do it on Windows? And do all major UNIX shells support the command1; command2 syntax? bash, tcsh and sh do, but I don't know about shells such as ksh and so on. Is this maybe in a standard? Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#20959) next »