dlfcn.cc: clear previous dl errors before new dlopen, dlsym, dlclose call?
David Huang
hzhr@21cn.com
Tue Jan 21 09:13:00 GMT 2003
Hi!
Is't needed to clear previous dl errors before new dlopen, dlsym, dlclose call?
See attach test programs.
$ gcc -shared -o demo.dll demo.c
$ gcc -shared -o demo2.dll demo2.c
$ gcc -o test test.c
$ ./test
Output:
handle = f20000
dlsym init_plugin fail
init_plugin = 0
handle2 = f20000
dlsym init_plugin fail
init_plugin = f21050
I think output maybe like these:
handle = f20000
dlsym init_plugin fail
init_plugin = 0
handle2 = f20000
init_plugin = f21050
Is it so?
Thanks.
2003-01-21 David Huang <davehzhr@hotmail.com>
* dlfcn.cc: Add clear_dl_error.
(dlopen): Clear previous dl error.
(dlsym): Ditto.
(dlclose): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dlfcn.cc.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030121/21a5d9af/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030121/21a5d9af/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: demo.c
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030121/21a5d9af/attachment-0001.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: demo2.c
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030121/21a5d9af/attachment-0002.c>
More information about the Cygwin-patches
mailing list