From owner-freebsd-hackers Fri Nov 15 08:24:47 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA26177 for hackers-outgoing; Fri, 15 Nov 1996 08:24:47 -0800 (PST) Received: from Kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA26086 for ; Fri, 15 Nov 1996 08:24:14 -0800 (PST) Received: from Mailbox.mcs.com (Mailbox.mcs.com [192.160.127.87]) by Kitten.mcs.com (8.8.2/8.8.2) with ESMTP id KAA01578; Fri, 15 Nov 1996 10:24:08 -0600 (CST) Received: from Mercury.mcs.net (karl@Mercury.mcs.com [192.160.127.80]) by Mailbox.mcs.com (8.8.2/8.8.2) with ESMTP id KAA28966; Fri, 15 Nov 1996 10:24:06 -0600 (CST) Received: (from karl@localhost) by Mercury.mcs.net (8.8.2/8.8.2) id KAA21706; Fri, 15 Nov 1996 10:24:05 -0600 (CST) From: Karl Denninger Message-Id: <199611151624.KAA21706@Mercury.mcs.net> Subject: Re: Sockets question... To: jgreco@brasil.moneng.mei.com (Joe Greco) Date: Fri, 15 Nov 1996 10:24:05 -0600 (CST) Cc: karl@mcs.net, jgreco@brasil.moneng.mei.com, scrappy@ki.net, jdp@polstra.com, hackers@FreeBSD.org In-Reply-To: <199611151617.KAA28016@brasil.moneng.mei.com> from "Joe Greco" at Nov 15, 96 10:17:30 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > > > > 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