unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* detecting broken pipe
@ 2006-04-24  4:23 Dan McMahill
  2006-04-25  0:03 ` Kevin Ryde
  0 siblings, 1 reply; 5+ messages in thread
From: Dan McMahill @ 2006-04-24  4:23 UTC (permalink / raw)


Hello,

I'm doing something like the following:

(use-modules (ice-9 popen))

(define pcb:pipe #f)

(define (pcb:launch-pcb)
   (set! pcb:pipe (open-output-pipe "pcb --listen"))
)

then later on I call pcb:launch-pcb and send stuff with

(display "some string" pcb:pipe)

This is all good right up until the "pcb --listen" command finishes 
(perhaps becuase it is a gui program and someone simply exited from it). 
  At this point the pipe is broken and the program which uses guile crashes.

So is there an easy way to detect when the pipe was terminated so I can 
avoid crashing?

Thanks
-Dan


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-25  2:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-24  4:23 detecting broken pipe Dan McMahill
2006-04-25  0:03 ` Kevin Ryde
2006-04-25  0:44   ` Dan McMahill
2006-04-25  1:19     ` Kevin Ryde
2006-04-25  2:10       ` Dan McMahill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).