From owner-freebsd-hackers Thu Jan 28 06:16:53 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA20942 for freebsd-hackers-outgoing; Thu, 28 Jan 1999 06:16:53 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA20936 for ; Thu, 28 Jan 1999 06:16:50 -0800 (PST) (envelope-from dick@ns.tar.com) Received: (from dick@localhost) by ns.tar.com (8.9.2/8.9.1) id IAA37488; Thu, 28 Jan 1999 08:16:40 -0600 (CST) (envelope-from dick) Date: Thu, 28 Jan 1999 08:16:40 -0600 From: "Richard Seaman, Jr." To: "Sergey S. Kosyakov" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: select(2) and threads Message-ID: <19990128081640.Q421@tar.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from Sergey S. Kosyakov on Thu, Jan 28, 1999 at 05:04:18PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jan 28, 1999 at 05:04:18PM +0300, Sergey S. Kosyakov wrote: > it seems that calling select in more than one concurrent thread cause all such > threads except the last to block forever. The same situation is with poll(). The > only case when select() and poll() work is when timeout is set to 0. > Is select really thread safe in FreeBSD? What compile/link flags are you using? The poll function isn't implemented for libc_r, AFAIK (I'm assuming you're using the libc_r "user thread" code right?). If you're able to use poll, chances are good you've linked against libc, so you're probably geting the libc select, and not the libc_r select. This would account for the symptoms you describe. -- Richard Seaman, Jr. email: dick@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message