diff options
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r-- | win32/perlhost.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index ea0d31d9dd..3b1d8ca282 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -1746,7 +1746,13 @@ PerlProcFork(struct IPerlProc* piPerl) #ifdef USE_ITHREADS DWORD id; HANDLE handle; - CPerlHost *h = new CPerlHost(*(CPerlHost*)w32_internal_host); + CPerlHost *h; + + if (w32_num_pseudo_children >= MAXIMUM_WAIT_OBJECTS) { + errno = EAGAIN; + return -1; + } + h = new CPerlHost(*(CPerlHost*)w32_internal_host); PerlInterpreter *new_perl = perl_clone_using((PerlInterpreter*)aTHXo, 1, h->m_pHostperlMem, h->m_pHostperlMemShared, |