summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 1ba2e51758..c94d4c5126 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2393,7 +2393,9 @@ win32_popen(const char *command, const char *mode)
/* close saved handle */
win32_close(oldfd);
+ FDPID_LOCK;
sv_setiv(*av_fetch(w32_fdpid, p[parent], TRUE), childpid);
+ FDPID_UNLOCK;
/* set process id so that it can be returned by perl's open() */
PL_forkprocess = childpid;
@@ -2429,7 +2431,9 @@ win32_pclose(FILE *pf)
int childpid, status;
SV *sv;
+ FDPID_LOCK;
sv = *av_fetch(w32_fdpid, win32_fileno(pf), TRUE);
+ FDPID_UNLOCK;
if (SvIOK(sv))
childpid = SvIVX(sv);
else