Date: Sat, 06 Jun 1998 08:33:26 +1000 (EST) From: Simon Coggins <chaos@oz.org> To: Terry Lambert <tlambert@primenet.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Problem with libc_r and blocking. Message-ID: <XFMail.980606083326.chaos@oz.org> In-Reply-To: <199806052056.NAA03615@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As per the first line of my message I'm running -current :) FreeBSD totally 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Wed Jun 3 23:41:37 EST 1998 On 05-Jun-98 Terry Lambert wrote: >> I've come across a problem trying to use c_r on freebsd-current. In the >> configure script of Roxen (http://www.roxen.com) web server, if you try and >> make the package use freebsd's libc_r (it takes alittle hacking in >> configure) >> when it find the threads functions correctly. But when it gets to test >> how to set things non-blocking it freezes and locks up. >> >> I've attached the .c file of what configure is doing when this happends if >> you >> compile this with >> >> gcc -pthread -D_THREAD_SAFE -o tst thread_test.c >> >> and run it it will lock up if you leave off -pthread it works correctly. >> >> Anyone out there have any idea? (are there plans to improve the threads >> support in freebsd?) I was looking thru the archives and didn't see much >> in the way of development info. > > Worked fine for me... > > hermes% cc -o thread_test thread_test.c > hermes% ./thread_test > Testing!!! > set_nonblocking() > set_nonblocking() > hermes% > > > hermes% cc -o thread_test -D_THREAD_SAFE thread_test.c -lc_r > hermes% ./thread_test > Testing!!! > set_nonblocking() > set_nonblocking() > hermes% > > This is on my FreeBSD 2.2-STABLE (post 2.2.5, before the 2.2.6 release) > box. The _THREAD_SAFE is not necessary on -current, and the -pthread > isn't in my compiler (that I've been able to tell), but all it does > is "-lc_r" before the implied "-lc".. the same thing I did explicitly, > above, with the command I used. > > > Supposedly, Julian Elisher checked in all of my and Jeremy Allison's > patches to both 2.2.6 and -current. > > One of these patches dealt *precisely* with this problem; the ioctl > was not wrapped. Other changes dealt with fcntl( , F_DUPFD, ), which > was also not wrapped, huge changes to error reporting, and signal > handling and other various changes. > > I presume you are running 2.2.5-release or earlier... if so, upgrade. > > > If you plan on using C++ with threads, use gcc 2.8.x with Jeremy's > patches for per thread exception stacks. This means you should get > the code from -ports, NOT from FSF! And *DON'T* use egcs at all. > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. Regards Simon +---------------------------------------------------------------+ | Email: chaos@ultra.net.au, chaos@oz.org, simon@bofh.com.au | | http://www.ultra.net.au/~chaos Ultranet Technical Admin. | | Chaos on IRC, IRC Operator for the OzORG Network | +---------------------------------------------------------------+ --- Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980606083326.chaos>