scsh-users
[Top] [All Lists]

scsh 0.6.4 errors (Linux 2.4.20): Channel closed: 0 0

To: scsh-news@zurich.ai.mit.edu
Subject: scsh 0.6.4 errors (Linux 2.4.20): Channel closed: 0 0
From: Sven.Hartrumpf@FernUni-Hagen.de
Date: 16 Jul 2003 12:37:06 +0200
Organization: FernUni Hagen
Hi all.

The following type of errors occur after different number of processed files
(and turns some of my scripts almost unusable).
To run the program scschbug.scm, you have to have the scsh-0.6.4/ directory
from the distributed tar ball unpacked in the directory where scshbug.scm is
located.

---

#!/usr/local/bin/scsh -s
!#

; run like: scshbug.scm

(define *num-files 0)

(define make-checksums (lambda (date)
  (let ((checksum-file (string-append "checksums" date)))
    (with-cwd*
      "scsh-0.6.4/"
      (lambda ()
        (let ((files (glob "*/*.c" "*/*/*.c")))
          (write (length files))(newline)
          (with-output-to-file
            checksum-file
            (lambda ()
              (for-each
                (lambda (file) ; example output line: "efgfggdsadggahs..." 
"20000101art_061.ces"
                  (write file)
                  (set! *num-files (+ *num-files 1))
                  (let ((result (run/sexps (| (cat ,file)
                                              (md5sum)))))
                    (write-char #\")
                    (write (car result))
                    (write-char #\")
                    (write-char #\space)
                    (write file)
                    (write-char #\space)
                    (write *num-files)
                    (newline)))
                files)))))))))

(for-each (lambda (date)
            (make-checksums (number->string date)))
          '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20))

---
example run:
> ./scshbug.scm 
79
79
79
79
79
79
79
79
79
79
Channel closed: 0 0
md5sum: -: Bad file descriptor
md5sum: standard input: Bad file descriptor

Error: exception
       (car '())
>

Greetings
Sven

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