#64 WITH-CWD breaks on rhs of definition

closed-fixed
run-time (53)
5
2002-01-29
2002-01-25
RT Happe
No

Under Linux 2.2.17:

Welcome to scsh 0.6.0 (Chinese Democracy)
Type ,? for help.
> (with-cwd "mail" 13)
13
> (define foo (with-cwd "mail" 6))

Error: 2
"No such file or directory"
#{Procedure 12963 (%chdir in scsh-level-0)}
"mail"
1> ,debug
'#{Exception-continuation (pc 22) (signal in scheme-level-0)}

[0] 'syscall-error
[1] '(2 "No such file or directory" #{Procedure 12963 #} "mail")

Discussion

  • Logged In: YES
    user_id=17553

    with-cwd is broken in 0.6.0 as it does not align the cwd
    before doing a chdir. Here is a fix:

    Index: scsh.scm

    RCS file: /cvsroot/scsh/scsh-0.6/scsh/scsh.scm,v
    retrieving revision 1.25
    diff -c -r1.25 scsh.scm
    *** scsh.scm 2001/12/19 09:14:15 1.25
    --- scsh.scm 2002/01/29 08:10:20
    ***************
    *** 181,186 ****
    --- 181,187 ----
    (let ((changed-dir #f))
    (with-lock resource-lock
    (lambda ()
    + (align-resource!)
    (change-and-cache dir)
    (set! changed-dir (cache-value))))
    (let-resource changed-dir thunk)))

     
    • labels: --> run-time
    • assigned_to: nobody --> mainzelm
    • status: open --> closed-fixed