Date: Tue, 08 Jun 2010 13:51:47 +0100 From: Timo Sirainen <tss@iki.fi> To: freebsd-hackers@freebsd.org Subject: close() failing with ECONNRESET Message-ID: <1276001507.6691.388.camel@kurkku.sapo.corppt.com>
next in thread | raw e-mail | index | archive | help
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? I'm not aware of any other OS that does this. Is this really something that many programs care about? I'd think there are only very few, and those exceptions could use some other syscall before close() to find out about it. Instead now you're forcing everyone else to change their code from: if (close(fd) < 0) log(..); to if (close(fd) < 0 && errno != ECONNRESET) log(..); or to write some wrapper to close().
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1276001507.6691.388.camel>