[Larceny-users] Larceny Runtime - SIGPIPE Handled?
Ray Racine
ray.racine at comcast.net
Mon May 19 20:19:51 EDT 2008
On Sun, 2008-05-18 at 23:18 -0500, Chris Brannon wrote:
>
> Are you checking the return value of write(2), to make sure that you don't
> do a partially successful write? Most people only check for a negative
> return value, assuming that they check at all. If your write(2) call
> doesn't write all the data that you supplied, then you had a partial write,
> and it's probably safe to assume that the connection was closed at the
> other end.
Hi Chris,
I do check for the return value +/-/0. My testing shows that the FFI
call to write() never returns at all even if the previous attempted
write() call succeeded in writing the full value. In Larceny's iosys
this is typically 1024 chunks.
Best guess at this time is the unhandled SIGPIPE signal that is raised.
I'm going to follow Will's suggestion and attach a null handler in the
Larceny runtime modeled after the SIGFPE code in signals.c
At the same time I'll put in additional code to carefully look at the
write() return value.
I'll update the list after my test on what I've found.
Ray
More information about the Larceny-users
mailing list