<[EMAIL PROTECTED]> writes: >Hello all, > I noticed one more thing. You code below has a try {} catch {}. Perl is C not C++. It does "exceptions" (i.e. eval { die } ) using setjmp()/longjmp(). That does not automatically co-exist with try/catch. So if your inner code ever throw-s perl's state will be in indeterminate state. For example it could leave file handles open, then when process ran out of file handles next perl attempt could fail. Don't know why it would recover though.
> >__declspec(dllexport) >long CFTPerlUserExitInstanceRun(char *FileName,char *FuncName,struct >PerlParmInfo *ParmsVec,unsigned int ParmsVecSize,char* pReason,int >*pCount,int *pUserExitRc, int *pPerlParseRc) >{ > long lRc = 0; > int count = -1; > PerlInterpreter* my_perl = NULL; > > > char *embedding[] = { "", FileName}; > > while (true) > { > my_perl = perl_alloc(); > if (my_perl == NULL) > { > lRc = -1; > break; > } > > > EnterCriticalSection(&g_ParserCS); > > try > { > PERL_SET_CONTEXT(my_perl); > PL_perl_destruct_level = 1; > perl_construct(my_perl); > if (pfnBreakHandlerReset) > { > (*pfnBreakHandlerReset)(); > } > > *pPerlParseRc = perl_parse(my_perl, xs_init, 2, embedding , >NULL); > lRc = *pPerlParseRc; > > LeaveCriticalSection(&g_ParserCS); > } > catch(...) > { > LeaveCriticalSection(&g_ParserCS); > lRc = -6; > break; > }