Kevin Ryde wrote:
Dan McMahill <[EMAIL PROTECTED]> writes:
ERROR: In procedure write_all:
ERROR: Broken pipe
Yes, that's right, you get a scheme-level error instead of sigpipe
terminating the whole process. (See `catch' in the guile manual for
trapping that error, or perhaps false-if-exception to ignore it.)
sweet! It seems to be working now. I'm posting what I ended up with so
the next lost soul searching the archives can find it. Thanks so much
for the help, I really appreciate it.
-Dan
;; Use this instead of
;; (display val pcb:pipe)
;;
(define (pcb:pipe-write val)
(if pcb:pipe
;; pipe is open so try and write out our value
(begin
(catch #t
;; try to write our value
(lambda ()
(display val pcb:pipe)
)
;; and if we fail spit out a message
;; and set pcb:pipe to false so we don't
;; try and write again
(lambda (key . args)
(display "It appears that PCB has terminated.\n")
(display "If this is not the case, you should save and
exit and\n")
(display "report this as a bug.\n\n")
(display "If you exited PCB on purpose, you can ignore
this message\n\n")
(set! pcb:pipe #f)
)
)
)
;; pipe is not open so don't try and write to it
;;(display "pcb:pipe is not open\n")
)
)
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user