diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-03-07 14:33:04 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-03-07 14:33:04 -0600 |
commit | 8c472fc1d477ec4a43d02ce6fc6458f4004c738d (patch) | |
tree | 40fc59bd6156fe8297cc48abacba142c15754630 /ext/DynaLoader/dl_vms.xs | |
parent | 4e71788c753f3f1e3668bcc2e7eae57e95c676e8 (diff) | |
download | perl-8c472fc1d477ec4a43d02ce6fc6458f4004c738d.tar.gz |
Make DynaLoader clone its private data under threads.
Diffstat (limited to 'ext/DynaLoader/dl_vms.xs')
-rw-r--r-- | ext/DynaLoader/dl_vms.xs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs index 5eb0d07673..7029c97688 100644 --- a/ext/DynaLoader/dl_vms.xs +++ b/ext/DynaLoader/dl_vms.xs @@ -143,7 +143,7 @@ dl_private_init(pTHX) dl_generic_private_init(aTHX); { dMY_CXT; - dl_require_symbols = get_av("DynaLoader::dl_require_symbols", 0x4); + dl_require_symbols = get_av("DynaLoader::dl_require_symbols", GV_ADDMULTI); /* Set up the static control blocks for dl_expand_filespec() */ dl_fab = cc$rms_fab; dl_nam = cc$rms_nam; @@ -358,4 +358,20 @@ dl_error() OUTPUT: RETVAL +#if defined(USE_ITHREADS) + +void +CLONE(...) + CODE: + MY_CXT_CLONE; + + /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid + * using Perl variables that belong to another thread, we create our + * own for this thread. + */ + MY_CXT.x_dl_last_error = newSVpvn("", 0); + dl_require_symbols = get_av("DynaLoader::dl_require_symbols", GV_ADDMULTI); + +#endif + # end. |