[Ecls-list] EPIPE and C errors

Matthew Mondor mm_lists at pulsar-zone.net
Mon Sep 24 20:55:34 UTC 2012


On Mon, 24 Sep 2012 22:26:27 +0200
Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com> wrote:

> On Fri, Sep 21, 2012 at 12:11 AM, Matthew Mondor
> <mm_lists at pulsar-zone.net>wrote:
> 
> > I noticed that functions such as WRITE-SEQUENCE will signal a condition
> > of type SIMPLE-ERROR if EPIPE is returned when writing.
> 
> 
> I just checked: it cannot be WRITE-SEQUENCE that signals the error, but the
> file operations. This definitely could be fixed. Do you have a simple
> reproducible example so that I can trace the chain of functions that
> provokes that?

Sep 24 06:34:40 ninja crow-httpd[17851]: d40abd0a # Error of type SIMPLE-ERROR: C operation (fwrite) to stream #<output stream "FD-STREAM"> signaled an error. C library explanation: Broken pipe.  Stack trace:  in G752  in HTTP-REPLY-FLUSH 
 in HTTP-REPLY-SEND  in HTML-TEST-PAGE  in HTTP-DYNAMIC-DISPATCH  in HTTP-SERVE  in ACCEPT-LOOP-THREAD 

HTTP-REPLY-FLUSH uses WRITE-STRING then WRITE-SEQUENCE, which in the
buffered fd-stream case uses stdio fwrite(3)
(output_stream_write_byte8() in src/c/file.d).  A SIGPIPE signal could
normally result too, but this was disabled using (ext:catch-signal
ext:+sigpipe+ :ignore) to avoid interrupting the whole process by a
process-wide POSIX signal.  With SIGPIPE ignored, write(2) (which of
course fwrite(3) uses) will instead report an EPIPE error on POSIX if
there is no reader at the other end.

Thanks,
-- 
Matt




More information about the ecl-devel mailing list