> On FreeBSD/OpenBSD my program outright core dumped and I could not
> figure out why for days and days.

So you had a bug in your code. So what?

> Now I have two separate builds - one built
> with "-D_REENTRANT -DTHREADS ... -lpthread" and one without.
> Only with Linux do you have the freedom of which you speak.

Well then that kills your point for any other platform than Linux, doesn't
it? You need two builds anyway.

> Well lets ask this question: "does fork() replicate all Thread
> Local Storage data or not?"  It certainly replicates the heap.
> It replicates all static data. It
> replicates all global data. But TLS? What does POSIX say about that?

> It's  a tricky question. You will see the POSIX lords actually have
> something
> to say about it  :-)

I don't see what that has to do with anything. My point is simply to refute
this argument:

>>> Further, on some systems you can't link with libpthread
>>> if you intend to use fork(). I have two builds of my
>>> software, one that does fork()ing and one that does
>>> pthread_create()ing. So I am trying to avoid having to have two
>>> installations of OpenSSL on every build platform.

And this argument would only apply to a platform where you wouldn't
otherwise two need builds, on which OpenSSL was supported, and which had
POSIX threads. If there's no such platform, then this argument is bogus.

>1) OpenSSL is supported,

Otherwise, you won't have any OpenSSL builds.

>2) Multiple threads are supported through a pthreads-like interface and
>are created with a pthread_create function.

Otherwise, there is no issue with 'fork' and 'pthread_create' compatability.

>3) You cannot link to the pthreads library and still use fork, and

Otherwise, there is no compatability issue.

>4) It is possible to compile a library such that it can be used by either a
>threaded or a non-threaded process.

Otherwise, you need two builds anyway.

So is there such a platform or not? If not, this argument is bogus.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to