Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Jun 1998 00:27:49 +1000 (EST)
From:      Simon Coggins <chaos@oz.org>
To:        freebsd-current@FreeBSD.ORG
Subject:   Problem with libc_r and blocking.
Message-ID:  <XFMail.980606002749.chaos@oz.org>

next in thread | raw e-mail | index | archive | help
This message is in MIME format
--_=XFMail.1.3.p0.FreeBSD:980606002748:25661=_
Content-Type: text/plain; charset=us-ascii


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.

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     |
      +---------------------------------------------------------------+
---
"I stopped believing in Santa Claus when I was six.  Mother took me to
see him in a department store and he asked for my autograph."
                -- Shirley Temple


--_=XFMail.1.3.p0.FreeBSD:980606002748:25661=_
Content-Disposition: attachment; filename="thread_test.c"
Content-Transfer-Encoding: base64
Content-Description: thread_test.c
Content-Type: application/octet-stream; name=thread_test.c; SizeOnDisk=1078

I2luY2x1ZGUgPHNpZ25hbC5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPGVycm5vLmg+
CiNpbmNsdWRlIDx1bmlzdGQuaD4KI2luY2x1ZGUgPHN5cy90eXBlcy5oPgojaW5jbHVkZSA8c3lz
L3NvY2tldC5oPgojaW5jbHVkZSA8ZmNudGwuaD4KI2luY2x1ZGUgPHN5cy9maWxpby5oPgojaW5j
bHVkZ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YWxhcm0oMSk7CiAgcmVhZCh0bXBbMF0sZm9vLDk5OSk7CiAgZnByaW50
ZihzdGRlcnIsIkZhaWxlZCBhdCBlbmQgb2YgbWFpbi5cbiIpOwogIGV4aXQoMSk7Cn0KCg==

--_=XFMail.1.3.p0.FreeBSD:980606002748:25661=_--
End of MIME message

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.980606002749.chaos>