On 9/28/05, Reed Sheridan <[EMAIL PROTECTED]> wrote: > Hi, > > The ports returned by tcp-accept don't handle broken pipes. > > Server: > (define l (tcp-listen 3000)) > (define-values (si so) (tcp-accept l)) > > Client: > (define-values (i o) (tcp-connect "localhost" 3000)) > (close-input-port i) > (close-output-port o) > > Server: > (display "foo" so) > (display "foo" so) > > Process scheme broken pipe > > With (set-signal-mask! (list signal/pipe)) you get a Chicken error instead > of a dead process. Is there a compelling reason not to make this the > default? I don't really know what other effects masking the signal has, but > a little googling shows that this is the most common way to deal with this > problem. >
As I read it blocking the signal is usually done only temporarily. Setting the signal handler to SIG_IGN works just as well (which is done by spiffy, for example). I'll add code in tcp.scm to do this automatically on UNIX systems. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
