chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Tcp bug report


From: felix winkelmann
Subject: Re: [Chicken-users] Tcp bug report
Date: Wed, 28 Sep 2005 09:00:15 +0200

On 9/28/05, Reed Sheridan <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]