fix exit status
This commit is contained in:
parent
5832e6a7eb
commit
54e9340f8c
|
@ -14,13 +14,16 @@ EXTERN_C void xs_init(pTHX)
|
||||||
|
|
||||||
int main (int argc, char **argv, char **env)
|
int main (int argc, char **argv, char **env)
|
||||||
{
|
{
|
||||||
|
int exitstatus = 0;
|
||||||
|
|
||||||
PERL_SYS_INIT3(&argc, &argv, &env);
|
PERL_SYS_INIT3(&argc, &argv, &env);
|
||||||
my_perl = perl_alloc();
|
my_perl = perl_alloc();
|
||||||
perl_construct(my_perl);
|
perl_construct(my_perl);
|
||||||
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
|
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
|
||||||
perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);
|
perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);
|
||||||
perl_run(my_perl);
|
exitstatus = perl_run(my_perl);
|
||||||
perl_destruct(my_perl);
|
perl_destruct(my_perl);
|
||||||
perl_free(my_perl);
|
perl_free(my_perl);
|
||||||
PERL_SYS_TERM();
|
PERL_SYS_TERM();
|
||||||
|
exit(exitstatus);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue