From 267eb276d137b7105d3803f603ecf674e11f17f4 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Wed, 7 Jan 2009 02:20:39 +0100 Subject: [PATCH] %WRITE-OCTETS/{NON-BLOCKING,TIMEOUT} must return :HANGUP in case of EPIPE. --- io.streams/zeta/ffi-functions-unix.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io.streams/zeta/ffi-functions-unix.lisp b/io.streams/zeta/ffi-functions-unix.lisp index 5153f30..063c091 100644 --- a/io.streams/zeta/ffi-functions-unix.lisp +++ b/io.streams/zeta/ffi-functions-unix.lisp @@ -144,11 +144,11 @@ Returns two boolean values indicating readability and writeability of `FD'." (handler-case (%sys-write fd (inc-pointer buf start) (- end start)) (ewouldblock () 0) - (epipe () :eof) + (epipe () :hangup) (posix-error (err) (posix-file-error err *device* "writing data to")) (:no-error (nbytes) - (if (zerop nbytes) :eof nbytes))))) + (if (zerop nbytes) :hangup nbytes))))) (defun %write-octets/timeout (fd vector start end timeout) (declare (type ub8-simple-vector vector) @@ -162,9 +162,9 @@ Returns two boolean values indicating readability and writeability of `FD'." (handler-case (%sys-write fd (inc-pointer buf start) (- end start)) (ewouldblock () (check-timeout)) - (epipe () (return-from :rloop :eof)) + (epipe () (return-from :rloop :hangup)) (posix-error (err) (posix-file-error err *device* "writing data to")) (:no-error (nbytes) (return-from :rloop - (if (zerop nbytes) :eof nbytes)))))))) + (if (zerop nbytes) :hangup nbytes)))))))) -- 2.11.4.GIT