[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MIT-Scheme-devel] working directory
From: |
Taylor R Campbell |
Subject: |
[MIT-Scheme-devel] working directory |
Date: |
Wed, 9 Feb 2011 20:41:47 +0000 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.0.1 |
We have a pretty random notion of a `working directory pathname',
which is sorta kinda correlated with the `default pathname defaults'
and the operating system's notion of the process's working directory.
Does anyone rely on this klunky semantics?
If not, I'd like to bring about the following state of affairs:
1. Scheme programs can open directories and fchdir to them.
2. Every Scheme thread has a working directory. Not a working
directory pathname, but a working directory, stored internally with
a file descriptor for the directory.
3. Before invoking any primitive that refers to the process's working
directory, Scheme will fchdir, if necessary, to the current
thread's working directory and then invoke the primitive. We could
do this either with a mutex lock in the runtime covering the fchdir
and other operation, or by adding primitives to the microcode that
either do the fchdir or use the openat &c. family of system calls.
4. When spawning a subprocess, Scheme programs can pass a directory
rather than a pathname to a directory to MAKE-SUBPROCESS &c., for
the subprocess's working directory.
This is all basically what scsh does, as described in the paper by
Martin Gasbichler and Mike Sperber, except that scsh uses pathnames
and chdir rather than directory file descriptors and fchdir.
Any objections? If I implement this, will whoever cares about Windows
figure out how to make it work there?
- [MIT-Scheme-devel] working directory,
Taylor R Campbell <=
- [MIT-Scheme-devel] working directory, Matt Birkholz, 2011/02/13
- Re: [MIT-Scheme-devel] working directory, Taylor R Campbell, 2011/02/13
- Re: [MIT-Scheme-devel] working directory, Taylor R Campbell, 2011/02/13
- Re: [MIT-Scheme-devel] working directory, Matt Birkholz, 2011/02/15
- Re: [MIT-Scheme-devel] working directory, Taylor R Campbell, 2011/02/15
- Re: [MIT-Scheme-devel] working directory, Joe Marshall, 2011/02/15
- Re: [MIT-Scheme-devel] working directory, Matt Birkholz, 2011/02/15