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

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

[MIT-Scheme-devel] Re: Intermittent error when using an i/o-port with ru


From: Taylor Venable
Subject: [MIT-Scheme-devel] Re: Intermittent error when using an i/o-port with run-shell-command
Date: Mon, 13 Sep 2010 18:10:26 -0400

On Sun, Sep 12, 2010 at 6:26 PM, Taylor Venable <address@hidden> wrote:
I was writing a program which ran an input file through sed first before processing when I hit this:

1 ]=> (let ((iss (open-input-string "foo")) (oss (open-output-string))) (run-shell-command "sed --version" 'input iss 'output oss))

;The port #[i/o-port 39 for channels: #[channel 40] #[channel 41]] signalled an error:
The primitive channel-write, while executing the write system call, received the error: Broken pipe.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error>

I get this sometimes: not every single time but frequently enough to be annoying; this particular example happens about 80% of the time on my (reasonably quick Linux AMD64) system, but when I do more I/O it doesn't happen at all (or perhaps so rarely I haven't yet encountered it).  I'm using 9.0.1 from Git; the last commit on my checkout was 780686c757d2c1c888575046f4e1c3beacb9176b.  Please let me know if there's anything more I can report or do to help test.

--
Taylor C. Venable
http://metasyntax.net/

Oh, I suppose this is probably entirely natural: (I assume) just because I had given the program input but it had already closed its input stream before scheme could write it. I don't know why I was thinking yesterday that this was a problem per se; I guess the real question is whether there is a way to suppress SIGPIPE so it doesn't interrupt execution by raising an error (if that's what's going on here).

--
Taylor C. Venable
http://metasyntax.net/

reply via email to

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