Date: Thu, 20 Jul 2000 15:30:31 +0800 From: "Tan Juay Kwang" <tanjk@i-dns.net> To: <freebsd-questions@freebsd.org> Subject: pthreads on 4.0-STABLE Message-ID: <NEBBLKHLGDECFCNMHPEECEMPCOAA.tanjk@i-dns.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi, I've got some questions regarding pthreads programming on the FBSD
4.0-STABLE platform. I've 2 scenarios which I hope somebody can help me
out.
The first involves using pthread_create to generate several threads that
basically calls gethostbyname(3). I realize that I can only create 2
threads at the most. Anything more, gethostbyname will never return and
thus the program will hang indefinitely. The same program runs fine on
Solaris 7 and RedHat 6.2
The second involves creating a thread that will block on a file I/O.
According to materials which I've read, a call to open a named pipe read
only will block until some other process opens it for writing. So the
scenario is that I've a main thread that uses pthread_create to spawn
another thread which will block on such an I/O, ie on the open(2) system
call. The anomaly is that the pthread_create does not return until that
I/O is completed. The call returns when I explicitly writes something to
it. The thread does more then just trying to open a file, but that is the
only point where it will block indefinitely. I tried the same thing on
RedHat 6.2 and it all works fine. I haven't try it on Solaris though.
Any help appreciated.
Many thanks and best regards,
Juay Kwang
[-- Attachment #2 --]
0 *H
010 + 0 *H
*0.0 v.=}%]
u0
*H
0_10 UUS10U
VeriSign, Inc.1705U.Class 1 Public Primary Certification Authority0
980512000000Z
080512235959Z010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated00
*H
0 ZDUz-Ox6
JoTw*h1ApzKHV-BD\B/;'
]6B3nTOJƚj$e~7jJ |0z0 `HB0GU @0>0<`HE0-0++www.verisign.com/repository/RPA0U0 0U0
*H
7;ڔ7 qjm/d8[jI}g-,ݚB>V*3ǾSLýIBc¦]XI<\Ue _Xj<n00]#
OF5}$;0
*H
010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated0
000628000000Z
000827235959Z010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. by Ref.,LIAB.LTD(c)9810UPersona Not Validated1&0$UDigital ID Class 1 - Netscape10UJuay Kwang Tan10 *H
tanjk@i-dns.net00
*H
0 շN^_I_lX xR_!XG])2!cOL9JK W%ҫԦN4ܷ{,MrUmDZqfkH|%g 00 U0 0DU =0;09`HE0*0(+https://www.verisign.com/rpa0 `HB03U,0*0(&$"http://crl.verisign.com/class1.crl0
*H
F0W9yX Dк4@|FPF6lAR^*ͦ6<UY)Oq"7r2NFwzda_2N֊Fj!iQt$L<>0 JHz=S318040010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated#
OF5}$;0 + 0 *H
1 *H
0 *H
1
000720073030Z0# *H
1_c
sWs|ً=0X *H
1K0I0
*H
0*H
0+0
*H
(0+0
*H
0 +710010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated#
OF5}$;0
*H
ʖGE㡟 Lَz}|\ZTKxTJ&f_fJ8Gr_w9:Zzk+9<P xcU0>kŧLtW|FT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NEBBLKHLGDECFCNMHPEECEMPCOAA.tanjk>
