From owner-freebsd-hackers Thu Apr 24 15:28:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA05570 for hackers-outgoing; Thu, 24 Apr 1997 15:28:30 -0700 (PDT) Received: from werple.net.au (melb.werple.net.au [203.9.190.18]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id PAA05551 for ; Thu, 24 Apr 1997 15:28:26 -0700 (PDT) Received: (qmail 29692 invoked by uid 5); 24 Apr 1997 22:28:24 -0000 Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.7.5/8.7.3) id IAA02009; Fri, 25 Apr 1997 08:25:00 +1000 (EST) From: John Birrell Message-Id: <199704242225.IAA02009@freebsd1.cimlogic.com.au> Subject: Re: Possible broken libc_r To: fenyo@email.enst.fr (Alex Fenyo eowyn) Date: Fri, 25 Apr 1997 08:24:59 +1000 (EST) Cc: nw1@cs.wustl.edu, freebsd-hackers@freebsd.org In-Reply-To: from "Alex Fenyo (eowyn)" at "Apr 24, 97 01:42:21 am" X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Alex Fenyo (eowyn) wrote: > It's not a bug, it's a feature :-) > With libc_r, each file descriptor, just after creation, is changed > to a non blocking state, for the convenience of libc_r. > It's most of the time hidden for the user, because libc_r remembers > the original state ("blocking" or not), and when a thread > makes a call on a blocking descriptor, libc_r makes a non blocking > call but if the call returns EAGAIN, libc_r removes the process > from the running queue. Later, when the call can be performed, > libc_r requeue the calling thread. > Libc_r adds a wrapper for each system call, to handle this mechanism. > BUT libc_r doesn't implement a wrapper for send() and recv(). > To bypass your problem, use sendto() and recvfrom() instead. AFAIK, libc_r doesn't need to wrapper send() and recv() because these are already wrappers in libc/net for sendto() and recvfrom() which _are_ wrappered. > > Sincerly, > Alexandre Fenyo > Regards, -- John Birrell - jb@cimlogic.com.au; jb@netbsd.org; jb@freebsd.org CIMlogic Pty Ltd, 119 Cecil Street, South Melbourne Vic 3205, Australia Tel +61 3 9690 6900 Fax +61 3 9690 6650 Mob +61 418 353 137