On Sat, 14 Feb 2004, Johannes Hofmann wrote:
Some more info on the BSD dpid problem: Actually, there is no need for any changes in the dillo sources. The problem comes from dpid beeing linked with the "-pthread" flag, which has strange consequences on the inherited file descriptors. If "-pthread" is used, one cannot close the inherited file descriptors anymore (one gets EBADF). I don't know, if this is a bug or a feature of the BSD thread implementation.
To avoid the problem, one can simple link dpid manually without the "-pthread" flag and everything works fine, at least for me.
Very interesting. AFAIU gcc has a way to set its behaviour with respect to the -pthread flag; that way it can be properly set for each OS. Now, in my experience BSD developers are very competent with regard to technical issues, so if it was done on purpose there may be good reasons behind. If that's the case (and not a misconfigured gcc), we can add a check in our configure.in. Cheers Jorge.-