mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] working directory


From: Matt Birkholz
Subject: [MIT-Scheme-devel] working directory
Date: Sun, 13 Feb 2011 10:33:48 -0700

> From: Taylor R Campbell <address@hidden>
> Date: Wed, 9 Feb 2011 20:41:47 +0000
> 
> 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?

I rely on the default pathname defaults to do everything, i.e. produce
absolute pathnames (URIs?).  Thus I do not have to think about the OS
process's working directory.  I do not often think of the OS process
at all.  I like that.  I like not dropping into C to frob things I
don't use.

How did you notice a klunkiness?  How do I produce a klunk?  I tried

    (with-working-directory-pathname "~/Scheme/MIT/src/"
      (lambda () (run-shell-command "cat makefiles_created")))

and it works correctly regardless of the OS process's mumblefrotz.

Are there procedures like run-shell-command that do not already
"fchdir, if necessary"?

> 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 spawn a hundred threads, do they open a hundred file descriptors?

If I pass "/absolute/filename" to a primitive that theoretically
depends on the cwd (as I am wont to do), will it now have to frob some
OS randomness before doing as I ask?

> If I implement this, will whoever cares about Windows figure out how
> to make it work there?

For appropriate values of "cares about Windows", yes. :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]