close() failing with ECONNRESET

Kostik Belousov kostikbel at gmail.com
Wed Jun 9 09:45:57 UTC 2010


On Wed, Jun 09, 2010 at 12:35:11AM -0700, perryh at pluto.rain.com wrote:
> Timo Sirainen <tss at iki.fi> wrote:
> 
> > I see that since FreeBSD 6.3 close() can fail with:
> >
> > > [ECONNRESET]	The underlying object was a stream socket that was
> > > 		shut down by the peer before all pending data was
> > > 		delivered.
> >
> > Could someone explain what this is useful for?
Note that any return from close(2) that does not set errno to EBADF
closes the supplied file descriptor. Mentioned errno value supplies
caller with the information that not "all pending data was delivered".

> 
> Consistency with SIGPIPE, perhaps?
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100609/103916e8/attachment.pgp


More information about the freebsd-hackers mailing list