Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 1996 10:24:05 -0600 (CST)
From:      Karl Denninger  <karl@mcs.net>
To:        jgreco@brasil.moneng.mei.com (Joe Greco)
Cc:        karl@mcs.net, jgreco@brasil.moneng.mei.com, scrappy@ki.net, jdp@polstra.com, hackers@FreeBSD.org
Subject:   Re: Sockets question...
Message-ID:  <199611151624.KAA21706@Mercury.mcs.net>
In-Reply-To: <199611151617.KAA28016@brasil.moneng.mei.com> from "Joe Greco" at Nov 15, 96 10:17:30 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > > > > Are you checking the return value from write() to make sure it actually
> > > > > thinks that N bytes were _written_?
> > > > > 
> > > > > ... JG
> > > > 
> > > > Uh, hang on a second...
> > > > 
> > > > Are you saying that the behavior of a *TCP* connection is such that you
> > > > would expect to see a write(2) call to the socket come back with a short
> > > > count for any reason other than the remote having closed or some other 
> > > > kind of transport error (ie: host unreachable, etc)?
> > > 
> > > Yes: a nonblocking socket write will most definitely display this
> > > behaviour.
> > 
> > Yes, but I did not set nonblocking mode on that socket.
> 
> Did you receive a signal?  That is known to cause similar behaviour on
> SunOS...

Can't.  Any signal on that process is a SERIOUS error; its a DBMS!  We have
a generic "oh shit" trap for all signals set; it does not go off.

> However, if you received a return value from write() equal to the number
> of bytes you supplied to write(), I would state that the problem is
> almost certainly elsewhere.
> 
> ... JG

Bingo.

--
--
Karl Denninger (karl@MCS.Net)| MCSNet - The Finest Internet Connectivity
http://www.mcs.net/~karl     | T1's from $600 monthly to FULL DS-3 Service
			     | 33 Analog Prefixes, 13 ISDN, Web servers $75/mo
Voice: [+1 312 803-MCS1 x219]| Email to "info@mcs.net" WWW: http://www.mcs.net/
Fax:   [+1 312 248-9865]     | 2 FULL DS-3 Internet links; 400Mbps B/W Internal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611151624.KAA21706>