[Larceny-users] Larceny Runtime - SIGPIPE Handled?

William D Clinger will at ccs.neu.edu
Mon May 19 09:34:54 EDT 2008


Ray Racine wrote:
> 1. Does my theory make sense?

Sounds good to me.

> 2. What would Larceny do if a SIGPIPE was thrown?  Exit?

Yes, I think that is what the current version of Larceny
will do.

> 3. Assuming SIGPIPE indeed needs to be dealt with, out of the two
> options 1) change to send with NOSIGNAL flag 2) Larceny Runtime
> handle/ignore/mask SIGPIPE which approach would you suggest.

I think the second option is the better way to go for the
long term.  See

    src/Rts/Sys/signals.h
    src/Rts/Sys/signals.c

It should be fairly easy to modify signals.c to treat
SIGPIPE the same as SIGFPE, which would allow you to
test your theory and to see whether the second approach
would solve the problem.  The hard part is testing the
signal-handling code under all of

    BSD_SIGNALS
    XOPEN_SIGNALS
    POSIX_SIGNALS
    STDC_SIGNALS
    WIN32_SIGNALS

If you can send us a prototype of the signal-handling
code you want for one of those, with a fairly simple
test case, then we should be able to generalize it to
all five.

Will



More information about the Larceny-users mailing list