Email List: Xaustin-group-lX
[All Lists]

thread safe dlerror()

To: austin-group-l@xxxxxxxxxxxxx
Subject: thread safe dlerror()
From: "Peter O'Gorman" <peter@xxxxxxxxx>
Date: Wed, 25 Feb 2009 09:23:35 -0600
Hi,

A couple of years ago I filed an aardvark
(http://opengroup.org/austin/mailarchives/austin-review-l/msg02170.html)
asking that the description of dlerror be changed. For some reason I
figured that I would be notified when the bug was modified, closed etc.,
and promptly forgot about it.

I remembered the other day, and did a quick search to find that it had
been rejected with:

"
dlerror() is not required to be thread safe.
The functionality could be provided by another function outside the
standard.
"

The dlerror page in the current standard says:

"
    The dlerror() function shall return a null-terminated character
string (with no trailing <newline>) that describes the last error that
occurred during dynamic linking processing. If no dynamic linking errors
have occurred since the last invocation of dlerror(), dlerror() shall
return NULL. Thus, invoking dlerror() a second time, immediately
following a prior invocation, shall result in NULL being returned.

    The dlerror() function need not be thread-safe.
"

I don't think that the response is valid, the current wording "describes
the last error that occurred during dynamic linking processing." appears
to disallow per-thread errors. HP-UX, Linux, Mac OS X, and others have a
thread safe dlerror() that returns only errors that occur on the current
thread, all I asked for is that this be explicitly allowed by the
standard, not that the standard require that dlerror be thread safe.

Thanks,
Peter
-- 
Peter O'Gorman
http://pogma.com

<Prev in Thread] Current Thread [Next in Thread>