From owner-freebsd-current Tue Sep 8 12:33:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA29853 for freebsd-current-outgoing; Tue, 8 Sep 1998 12:33:35 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA29812 for ; Tue, 8 Sep 1998 12:33:22 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id PAA13564; Tue, 8 Sep 1998 15:33:19 -0400 (EDT) Date: Tue, 8 Sep 1998 15:33:19 -0400 (EDT) From: Daniel Eischen Message-Id: <199809081933.PAA13564@pcnet1.pcnet.com> To: info@highwind.com, tlambert@primenet.com Subject: Re: Thread Problems Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 21620 typhoond CALL accept(0x6,0x10afd8,0x10afd4) > > > > That is it. The application SITS idle right here. Doing NOTHING. It > > will respond to additional connections. So, it appears that the > > "accept()" thread is still responsive. However, all other threads are > > not responsive. > > You are aware of the fact the socket options are not inherited > across a dup, dup2, fcntl( ..., F_DUPFD, ...), connect, accept, > bind, etc., right? The threads library makes the files non-blocking. He's doing an accept on a listen socket that the threads library should have made (and did, because it works the first time) non-blocking. The socket should have been made non-blocking when it was made by the wrapped socket() call. dup, dup2, connect, accept, and bind are all wrapped by the threads library and should result in non-blocking files also. It does seem that the listen socket somehow became blocking, but it isn't apparent by looking at the code. Is a fcntl(fd, F_SETFL, O_NONBLOCK) sufficient to set a socket non-blocking across multiple accepts? Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message