Re: detecting broken pipe

2006-04-24 Thread Dan McMahill
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-except

Re: detecting broken pipe

2006-04-24 Thread Kevin Ryde
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.)

Re: detecting broken pipe

2006-04-24 Thread Dan McMahill
Kevin Ryde wrote: Dan McMahill <[EMAIL PROTECTED]> writes: So is there an easy way to detect when the pipe was terminated so I can avoid crashing? You can set the SIGPIPE signal to avoid terminating on a broken pipe. Usually setting it to SIG_IGN is the cleanest, with that a write throws an

Re: detecting broken pipe

2006-04-24 Thread Kevin Ryde
Dan McMahill <[EMAIL PROTECTED]> writes: > > So is there an easy way to detect when the pipe was terminated so I > can avoid crashing? You can set the SIGPIPE signal to avoid terminating on a broken pipe. Usually setting it to SIG_IGN is the cleanest, with that a write throws an EPIPE error. (Rea

detecting broken pipe

2006-04-23 Thread Dan McMahill
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 u