diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 11:25:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 11:25:49 +0000 |
commit | d18c61170a30691556a1da7413e13241a92f4e0a (patch) | |
tree | 58efea7fd3e3f003a26aa8ba1af6e4d6e9bd6e10 /win32 | |
parent | 5c831c245cbd15531aac8207bd2cc7d8bf7a2bab (diff) | |
download | perl-d18c61170a30691556a1da7413e13241a92f4e0a.tar.gz |
preliminary support for perl_clone() (still needs work in
the following areas: SVOPs must indirect via pad; context
stack, scope stack, and runlevels must be cloned; must
hook up the virtualized pseudo-process support provided by
"host"; ...)
p4raw-id: //depot/perl@4538
Diffstat (limited to 'win32')
-rw-r--r-- | win32/perllib.c | 8 | ||||
-rw-r--r-- | win32/win32.c | 16 |
2 files changed, 23 insertions, 1 deletions
diff --git a/win32/perllib.c b/win32/perllib.c index e8d59cdf36..0480ae3786 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -1556,7 +1556,15 @@ RunPerl(int argc, char **argv, char **env) exitstatus = perl_parse(my_perl, xs_init, argc, argv, env); if (!exitstatus) { +#ifdef USE_ITHREADS /* XXXXXX testing */ +extern PerlInterpreter * perl_clone(pTHXx_ IV flags); + + PerlInterpreter *new_perl = perl_clone(my_perl, 0); + exitstatus = perl_run( new_perl ); + /* perl_destruct(new_perl); perl_free(new_perl); */ +#else exitstatus = perl_run( my_perl ); +#endif } perl_destruct( my_perl ); diff --git a/win32/win32.c b/win32/win32.c index cf341cdb62..d3a7b404f7 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3331,6 +3331,21 @@ Perl_win32_init(int *argcp, char ***argvp) MALLOC_INIT; } +#ifdef USE_ITHREADS +void +Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) +{ + dst->perlshell_tokens = Nullch; + dst->perlshell_vec = (char**)NULL; + dst->perlshell_items = 0; + dst->fdpid = newAV(); + New(1313, dst->children, 1, child_tab); + dst->children->num = 0; + dst->hostlist = src->hostlist; /* XXX */ + dst->thr_intern.Winit_socktype = src->thr_intern.Winit_socktype; +} +#endif + #ifdef USE_BINMODE_SCRIPTS void @@ -3355,4 +3370,3 @@ win32_strip_return(SV *sv) } #endif - |