From owner-freebsd-hackers Mon Jul 7 20:32:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA24848 for hackers-outgoing; Mon, 7 Jul 1997 20:32:09 -0700 (PDT) Received: from lister.bogon.net (0@gw.bogon.net [204.137.132.49]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA24843 for ; Mon, 7 Jul 1997 20:32:06 -0700 (PDT) Received: from kryten.bogon.net (500@kryten.bogon.net [204.137.132.58]) by lister.bogon.net (8.8.5/8.8.5) with ESMTP id UAA19993; Mon, 7 Jul 1997 20:32:04 -0700 (PDT) From: Wes Santee Received: (from wes@localhost) by kryten.bogon.net (8.8.6/8.8.5) id UAA08043; Mon, 7 Jul 1997 20:31:59 -0700 (PDT) Message-Id: <199707080331.UAA08043@kryten.bogon.net> Subject: Re: Is there a thread-happy recv()? In-Reply-To: <199707071826.LAA18090@phaeton.artisoft.com> from Terry Lambert at "Jul 7, 97 11:26:04 am" To: terry@lambert.org (Terry Lambert) Date: Mon, 7 Jul 1997 20:31:59 -0700 (PDT) Cc: gurney_j@resnet.uoregon.edu, wes@bogon.net, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (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 >From the desk of Terry Lambert comes: > > Wes Santee scribbled this message on Jul 6: > > > Hi all. I noticed in a chunk of code I'm writing that a blocking call > > > to recv() is putting the entire process to sleep such that even the > > > > don't use recv, use read instead... the reason recv isn't wrapped is > > that wrapping it is pointless, and may be removed in the future (from > > man page) > > What about recvfrom()? recvfrom() seems to work okay. I substituted it for recv() and everything completed normally without suspending the entire process. I should have tried it, but I try to avoid the functions that do the same, but with more parameters. :) Cheers, -- ( Wes Santee PGP: e-mail w/Subject: "Send PGP Key" ) ( mailto:wes@bogon.net )