From owner-freebsd-current Fri Jun 5 07:28:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA00545 for freebsd-current-outgoing; Fri, 5 Jun 1998 07:28:35 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from totally.damaged.org (totally.damaged.org [198.142.63.35]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA00389 for ; Fri, 5 Jun 1998 07:28:14 -0700 (PDT) (envelope-from simon@totally.damaged.org) Received: (from simon@localhost) by totally.damaged.org (8.8.8/8.8.8) id AAA01057 for freebsd-current@freebsd.org; Sat, 6 Jun 1998 00:27:52 +1000 (EST) (envelope-from simon) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_=XFMail.1.3.p0.FreeBSD:980606002748:25661=_" Date: Sat, 06 Jun 1998 00:27:49 +1000 (EST) From: Simon Coggins To: freebsd-current@FreeBSD.ORG Subject: Problem with libc_r and blocking. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 bHVkZSA8c3lzL3NvY2tpby5oPgoKaW50IHNldF9ub25ibG9ja2luZyhpbnQgZmQsaW50IHdoaWNo KQp7CglmcHJpbnRmKHN0ZGVyciwgInNldF9ub25ibG9ja2luZygpXG4iKTsKICByZXR1cm4gZmNu dGwoZmQsIEZfU0VURkwsIHdoaWNoP0ZOREVMQVk6MCk7Cn0KCmludCBxdWVyeV9ub25ibG9ja2lu ZyhpbnQgZmQpCnsKCWZwcmludGYoc3RkZXJyLCAicXVlcnlfbm9uYmxvY2tpbmcoKVxuIik7CiAg cmV0dXJuIGZjbnRsKGZkLCBGX0dFVEZMLCAwKSAmIEZOREVMQVk7Cn0KCmludCBzZXRfY2xvc2Vf b25fZXhlYyhpbnQgZmQsIGludCB3aGljaCkKewoJZnByaW50ZihzdGRlcnIsICJzZXRfY2xvc2Vf b25fZXhlYygpXG4iKTsKICByZXR1cm4gZmNudGwoZmQsIEZfU0VURkQsICEhd2hpY2gpOwp9Cgp2 b2lkIHNpZ2Fscm1faGFuZGxlcjAoaW50IHRtcCkgeyBleGl0KDApOyB9CnZvaWQgc2lnYWxybV9o YW5kbGVyMShpbnQgdG1wKQp7CiAgZnByaW50ZihzdGRlcnIsIkZhaWxlZCBpbiBhbGFybSBoYW5k bGVyIDFcbiIpOwogIGV4aXQoMSk7Cn0KCmludCBtYWluKCkKewogIGludCB0bXBbMl07CiAgY2hh ciBmb29bMTAwMF07CgogIHRtcFswXT0wOwogIHRtcFsxXT0wOwoKCWZwcmludGYoc3Rkb3V0LCAi VGVzdGluZyEhIVxuIik7CiAgc2V0X25vbmJsb2NraW5nKHRtcFswXSwxKTsKICBzaWduYWwoU0lH QUxSTSwgc2lnYWxybV9oYW5kbGVyMSk7CiAgYWxhcm0oMSk7CiAgcmVhZCh0bXBbMF0sZm9vLDk5 OSk7CiAgc2V0X25vbmJsb2NraW5nKHRtcFswXSwwKTsKICBzaWduYWwoU0lHQUxSTSwgc2lnYWxy bV9oYW5kbGVyMCk7CiAgYWxhcm0oMSk7CiAgcmVhZCh0bXBbMF0sZm9vLDk5OSk7CiAgZnByaW50 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