On Sun, Jan 21, 2001 at 05:02:21PM +0000, Alan Burlison wrote: > Kinda both. Perl5 threads are irredeemably broken, and IMHO should be > excised from the source as soon as possible - leaving them in only gives > the mistaken impression that they might actually work some day. The > MT-unsafe behaviour of the current eval mechanism when used with threads > is just one of the reasons why they are so broken. And another. We're using gethostbyname. To quote an online Sun manpage: The functions gethostbyname() , gethostbyaddr() , and gethostent() use static storage that is reused in each call, making these functions unsafe for use in multi-threaded applications. The functions gethostbyname_r() , gethostbyaddr_r() , and gethostent_r() provide reentrant interfaces for these operations. [however, I don't know whether that many platforms provide the latter's functionality, and if so if they even use the same names] How many other non thread-safe interfaces is perl5 using? [actually, is that important - how much of C's undefined behaviour is perl5 source actually relying on] Nicholas ClarkThread Previous | Thread Next