This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlfcn.cc: clear previous dl errors before new dlopen, dlsym, dlclose call?


On Tue, Jan 21, 2003 at 05:17:14PM +0800, David Huang wrote:
>Is't needed to clear previous dl errors before new dlopen, dlsym,
>dlclose call?

I don't see anything in the documentation which would indicate this.
However, the current implementation seems to be wrong since it always
returns the last load error even when called repeatedly.

SUSv3 says:

"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."

So, I've modified dlerror to do just that.

Thanks for bringing this to our attention.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]