;;; -*-Scheme-*-
;;;
-;;; $Id: imail-util.scm,v 1.27 2000/05/30 20:53:19 cph Exp $
+;;; $Id: imail-util.scm,v 1.28 2000/06/19 02:01:54 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(bind-condition-handler (list condition-type:system-call-error
condition-type:derived-port-error)
(lambda (condition)
- (if (or (broken-pipe? condition)
- (derived-broken-pipe? condition))
+ (if (broken-pipe? condition)
(handler condition)))
thunk))
(define (broken-pipe? condition)
- (and (eq? (condition/type condition) condition-type:system-call-error)
- (eq? (system-call-name condition) 'WRITE)
- (eq? (system-call-error condition) 'BROKEN-PIPE)))
+ (cond ((eq? (condition/type condition) condition-type:system-call-error)
+ (and (eq? (system-call-name condition) 'WRITE)
+ (eq? (system-call-error condition) 'BROKEN-PIPE)))
+ ((eq? (condition/type condition) condition-type:derived-port-error)
+ (broken-pipe? (derived-port-condition condition)))
+ (else #f)))
(define system-call-name
(condition-accessor condition-type:system-call-error 'SYSTEM-CALL))
(define system-call-error
(condition-accessor condition-type:system-call-error 'ERROR-TYPE))
-(define (derived-broken-pipe? condition)
- (and (eq? (condition/type condition) condition-type:derived-port-error)
- (broken-pipe? (derived-port-condition condition))))
-
(define derived-port-condition
(condition-accessor condition-type:derived-port-error 'CONDITION))
\f