From owner-freebsd-stable Fri Sep 29 13: 1:11 2000 Delivered-To: freebsd-stable@freebsd.org Received: from moon.harmonic.co.il (moon.harmonic.co.il [192.116.140.65]) by hub.freebsd.org (Postfix) with ESMTP id 1CDAC37B495 for ; Fri, 29 Sep 2000 13:01:01 -0700 (PDT) Received: (from nobody@localhost) by moon.harmonic.co.il (8.9.3/8.9.3) id WAA29987; Fri, 29 Sep 2000 22:00:04 +0200 To: Alfred Perlstein Subject: Re: pthreads bug? Message-ID: <970257604.39d4f4c41cfff@webmail.harmonic.co.il> Date: Fri, 29 Sep 2000 22:00:04 +0200 (IST) From: Roman Shterenzon Cc: Daniel Eischen , freebsd-stable@FreeBSD.ORG References: <20000929013521.C27736@fw.wintelcom.net> <20000929103756.I27736@fw.wintelcom.net> In-Reply-To: <20000929103756.I27736@fw.wintelcom.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.2 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Quoting Alfred Perlstein : > * Daniel Eischen [000929 04:29] wrote: > > > > I don't think it should be fixed unless we decide to remove the > > automatic locking of file descriptors. But if you do come up > > with a clean solution, please run it by me. I have some massive > > changes to the threads library that are currently under review. > > Well the hackish idea that I had was to set the thread runnable > but somehow set a flag so that it knows it's the "accept() being > broken by close() wakeup." The accept()ing thread can then unlock > the file and return EBADF or whatever it's supposed to. After what Daniel said, I'm not sure about the close()/accept() behavior, however I know how Solaris7 and Linux 2.2.x behave. But, there should be escape from read(), i.e. close() must be permitted on socket on which there's a read(). Perhaps the original LINGER (via setsockopt) behavior should be retained when the current behavior is needed. I'd be glad to test any provided patches. --Roman Shterenzon, UNIX System Administrator and Consultant [ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message