From owner-freebsd-stable Thu Mar 29 11:32: 7 2001 Delivered-To: freebsd-stable@freebsd.org Received: from flounder.jimking.net (flounder.jimking.net [209.205.176.18]) by hub.freebsd.org (Postfix) with ESMTP id 2526237B71D for ; Thu, 29 Mar 2001 11:32:04 -0800 (PST) (envelope-from jim@jimking.net) Received: from jking (jking.lgc.com [134.132.76.82]) (authenticated) by flounder.jimking.net (8.11.2/8.11.2) with ESMTP id f2TJVKO67423 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified NO); Thu, 29 Mar 2001 13:31:25 -0600 (CST) (envelope-from jim@jimking.net) Message-ID: <00dd01c0b886$d8510250$524c8486@jking> From: "Jim King" To: "Nate Williams" , "Brian Matthews" Cc: , "Allen Landsidel" , References: <15043.35980.669828.971544@nomad.yogotech.com> Subject: Re: Threads vs. blocking sockets Date: Thu, 29 Mar 2001 13:31:20 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Nate Williams" wrote: > > | Therefore, if you call a blocking system call, *ALL* threads > > | block, thus causing your entire application to 'hang'. > > > > That's why there are wrappers for the socket calls in libc_r, so a socket as > > seen by the kernel is always nonblocking (and thus won't hang the entire > > application), but a socket seen by the application can be blocking or > > nonblocking, whichever makes most sense for the application. Unfortunately, > > the wrappers only do half the job. > > Again, all threading libraries I've used (not just on FreeBSD) *require* > the user to check that when sending/receiving data, the caller must make > sure that all the expected data has been sent/received. The man page for send(2) doesn't mention this. It sounds broken to me. Jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message