Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass non-null argc,argv to PERL_SYS_INIT

Fixes a segfault on Win32, but not the "Aborted" issue...
  • Loading branch information...
commit d468f8f34929e6ebdefe8a6e508eaa6aaa58de41 1 parent 6c08103
@sorear authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/p5embed.c
View
5 lib/p5embed.c
@@ -19,7 +19,10 @@ xs_init(pTHX)
static PerlInterpreter *my_perl;
void p5embed_initialize()
{
- PERL_SYS_INIT3(0,NULL,NULL);
+ int argc = 1;
+ char *argv0[] = { "perl", NULL, 0 };
+ char **argv = argv0;
+ PERL_SYS_INIT(&argc,&argv);
my_perl = perl_alloc();
perl_construct(my_perl);
char *embedding[] = { "", "-e", "0" };
Please sign in to comment.
Something went wrong with that request. Please try again.