I have a small script which deletes all my temporary files under /tmp
(Something similar what Olin has in the Scsh Manual). This works under
Scsh 0.5.3, but doesn't under Scsh 0.6.0, which I picked up from the
CVS on Friday, October 19. I am running it under SunOS 5.7.
This is the core of the script, which returns all files belonging to
me under /tmp:
(with-cwd "/tmp"
(filter (lambda (file) (= (file-owner file) me)) ; me = (user-uid)
(directory-files)))
Under Scsh 0.6.0 this error message is printed:
Error: exception
wrong-type-argument
(return-from-callback "scheme_stat" '#{Random object})
Sometimes this is printed:
Error: exception
wrong-type-argument
(return-from-callback "scheme_stat" <Error while displaying condition.>
And at other times, it crashes:
Process scheme segmentation Fault (core dumped)
The script works fine under Scsh 0.5.3 and I have used it at least two
to three times a week since 0.5.3's release.
I found out that certain files aren't readable under /tmp. Maybe this
is causing the problem:
> (define a)
> (with-cwd "/tmp/"
(filter (lambda (f)
;; Find out the file that causes the problem
(set! a f)
(= (file-owner f) (user-uid)))
(directory-files)))
> a
"krb5cc_109161"
> (file-readable? "/tmp/krb5cc_109161")
Error: exception
gc-protection-mismatch
(return-from-callback "scheme_stat")
Under Scsh 0.5.3:
> (file-readable? "/tmp/krb5cc_109161") ;; The above file
#f
Hopefully this is kinda clear. If not please email me. I did read
the source code, but it wasn't of any help.
Sriram
|