Re: Re: Current working directory and multi-threaded environments
| From: | Andi Gutmans | Date: | Wed, 15 Mar 2000 19:43:16 +0000 |
| Subject: | Re: Re: Current working directory and multi-threaded environments | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16857@lists.php.net to get a copy of this message | ||
On Wed, 15 Mar 2000 rubys@us.ibm.com wrote:
>
>
> >We are talking about reacting (getcwd) to an action by the server (chdir).
>
> That's not how I interpreted Andi's proposal.
I guess I wasn't clear.
My proposal was not to do any chdir()'s (nor getcwd()'s) anymore so that
as you said, multiple threads can run in parallel correctly. What I want
to do is emulate the chdir() behavior, or in a more general sense the
current working directory behavior by saving the current working directory
per-thread as a string and working with that everywhere. A call to our new
virtual_chdir() function would change that string to reflect the new
working directory and would not actually call the chdir() system call.
virtual_getcwd() therefore, would return the value of the current working
directory string and not the result of the system call getcwd().
Andi