From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marco Maggi" Newsgroups: gmane.lisp.guile.user Subject: Re: should accept be protected with fport_wait_for_input? Date: Tue, 4 Dec 2007 07:55:00 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1196751321 5262 80.91.229.12 (4 Dec 2007 06:55:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2007 06:55:21 +0000 (UTC) To: "guile-user" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Dec 04 07:55:31 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzRgj-0003ai-7i for guile-user@m.gmane.org; Tue, 04 Dec 2007 07:55:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzRgS-0008C3-Vn for guile-user@m.gmane.org; Tue, 04 Dec 2007 01:55:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzRgO-00087W-2B for guile-user@gnu.org; Tue, 04 Dec 2007 01:55:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzRgM-00085i-JF for guile-user@gnu.org; Tue, 04 Dec 2007 01:55:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzRgM-00085c-Fs for guile-user@gnu.org; Tue, 04 Dec 2007 01:55:02 -0500 Original-Received: from relay-pt4.poste.it ([62.241.4.118]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzRgL-0007I8-TV for guile-user@gnu.org; Tue, 04 Dec 2007 01:55:02 -0500 Original-Received: from poste.it (192.168.144.52) by relay-pt4.poste.it (7.3.122) (authenticated as marco.maggi-ipsu@poste.it) id 475498CD00001939 for guile-user@gnu.org; Tue, 4 Dec 2007 07:55:00 +0100 X-Sensitivity: 3 X-XaM3-API-Version: 4.3 (R1) (B3pl19) X-SenderIP: 83.190.104.69 X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6316 Archived-At: Ciao, "dskr" wrote: >Should this protection be extended to 'accept' in the socket >code to prevent the entire runtime from blocking if a thread >blocks on accept? I am not an expert in networking, but it seems to me that to avoid blocking you need to make the server socket non-blocking. I dunno what is you platform, but if you are using the GNU C Library you can read the "accept" info node: The `accept' function waits if there are no connections pending, unless the socket SOCKET has nonblocking mode set. (You can use `select' to wait for a pending connection, with a nonblocking socket.) *Note File Status Flags::, for information about nonblocking mode. HTH -- Marco Maggi "Now feel the funk blast!" Rage Against the Machine - "Calm like a bomb" _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user