From owner-freebsd-questions Sat Feb 8 14:28:36 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA04305 for questions-outgoing; Sat, 8 Feb 1997 14:28:36 -0800 (PST) Received: from spiff.cc.iastate.edu (spiff.cc.iastate.edu [129.186.142.89]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id OAA04298 for ; Sat, 8 Feb 1997 14:28:32 -0800 (PST) Received: by spiff.cc.iastate.edu with sendmail-5.65 id ; Sat, 8 Feb 1997 16:28:29 -0600 Message-Id: <9702082228.AA08214@spiff.cc.iastate.edu> To: questions@freebsd.org Reply-To: graphix@iastate.edu Subject: blocking read and threads Date: Sat, 08 Feb 1997 16:28:29 CST From: Kent Vander Velden Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk The program that I am working on created a new thread for each newtcp/ip based connection. In each of these new threads, a read is proformed to build the request to process. This read needs to be a blocking read. I have not done anything to change signal mask, etc. What I am getting at the moment is the read will fail and set errno equal to EAGAIN. I can but all this in a loop ignoring when read fails and errno is equal to EAGAIN but this is very ineffecient considering ow fast this loop runs. Any ideas? I am using the newly updated libc_r library. This version is working MUCH better for me than the previous version since the syslog() function does not cause the program to stall forever. Thanks. --- Kent Vander Velden graphix@iastate.edu