summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_sys.c2
-rw-r--r--sv.c2
-rw-r--r--win32/perlhost.h6
3 files changed, 7 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 6bc9f8b3be..b661a88663 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3679,6 +3679,8 @@ PP(pp_fork)
EXTEND(SP, 1);
PERL_FLUSHALL_FOR_CHILD;
childpid = PerlProc_fork();
+ if (childpid == -1)
+ RETSETUNDEF;
PUSHi(childpid);
RETURN;
# else
diff --git a/sv.c b/sv.c
index fb68efae2f..5517355de0 100644
--- a/sv.c
+++ b/sv.c
@@ -3467,7 +3467,7 @@ Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, char *little, STRLEN
if (!bigstr)
Perl_croak(aTHX_ "Can't modify non-existent substring");
SvPV_force(bigstr, curlen);
- SvPOK_only_UTF8(bigstr);
+ (void)SvPOK_only_UTF8(bigstr);
if (offset + len > curlen) {
SvGROW(bigstr, offset+len+1);
Zero(SvPVX(bigstr)+curlen, offset+len-curlen, char);
diff --git a/win32/perlhost.h b/win32/perlhost.h
index cac05b2832..51e125b848 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -1770,8 +1770,10 @@ PerlProcFork(struct IPerlProc* piPerl)
(LPVOID)new_perl, 0, &id);
# endif
PERL_SET_THX(aTHXo); /* XXX perl_clone*() set TLS */
- if (!handle)
- Perl_croak(aTHX_ "panic: pseudo fork() failed");
+ if (!handle) {
+ errno = EAGAIN;
+ return -1;
+ }
w32_pseudo_child_handles[w32_num_pseudo_children] = handle;
w32_pseudo_child_pids[w32_num_pseudo_children] = id;
++w32_num_pseudo_children;