Hi Antony,

Antony Dovgal wrote:

> Rob, I believe you're looking into wrong place.
> You should be patching virtual_file_ex() in TSRM/tsrm_virtual_cwd.c, the root 
> of 
> all evils is there as this function is used by expand_filepath() and in all 
> other places.

Ok, originally was going to try that, but, virtual_file_ex() is being
truthful in this case and correctly returning false and an empty cwd when:

   state->cwd_length == 0

..which is exactly what getcwd() is returning.  I'm thinking that
changing the tsrm_virtual_cwd code, or even the expand_filepath()
functions to fake a filepath, even with an #ifdef SOLARIS may not be
good style.  I don't know though, I'm still learning here.

> Also, as you might have noticed, we do not use system calls like open() 
> directly, we use VCWD_xxx() wrappers for that.
> They are defined in TSRM/ either.

The use of the open() function was lifted right from later on in the
function call where the FD for the stream is normally created.  Is this
something that needs to be fixed too?

Thanks,
-Rob

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to