scsh-hackers
[Top] [All Lists]

[Scsh-hackers] [ scsh-Bugs-508664 ] WITH-CWD breaks on rhs of definition

To: noreply@sourceforge.net
Subject: [Scsh-hackers] [ scsh-Bugs-508664 ] WITH-CWD breaks on rhs of definition
From: noreply@sourceforge.net
Date: Tue Jan 29 02:16:04 2002
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
Bugs item #508664, was opened at 2002-01-25 12:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=508664&group_id=10493

>Category: run-time
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Rolf-Thomas Happe (rthappe)
>Assigned to: Martin Gasbichler (mainzelm)
Summary: WITH-CWD breaks on rhs of definition

Initial Comment:
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")


----------------------------------------------------------------------

>Comment By: Martin Gasbichler (mainzelm)
Date: 2002-01-29 02:15

Message:
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)))


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=508664&group_id=10493


<Prev in Thread] Current Thread [Next in Thread>