Re: Definition of working directory Marc Feeley 23 Apr 2020 14:06 UTC

> On Apr 23, 2020, at 9:51 AM, Lassi Kortela <xxxxxx@lassi.io> wrote:
>
>> I am a bit shared. I understand that having proper "current working directory"
>> based on parameter-like semantic, and having it per thread could be a good
>> thing. But SRFI 170 is about "POSIX API", and I would expect the standard
>> behaviour found in C world, where getcwd() is a per-process property
>

I understand that SRFI 170 is about the POSIX API where chdir(), and also umask(), have a well defined behaviour.

I would like however for SRFI 170 to include a statement that calls to chdir() do not affect the behaviour of open-input-file, etc.  This has to be very clear because many programmers will assume that there is a link between the process CWD and the interpretation of relative paths by open-input-file, etc.

This suggests a need to add to SRFI 170 a procedure such as (process-path->absolute string) that interprets “string” according to the process’ CWD and returns an absolute path that can be used by open-input-file, etc

Marc