summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Keeler <dkeeler@mozilla.com>2017-06-21 18:57:13 +0200
committerDavid Keeler <dkeeler@mozilla.com>2017-06-21 18:57:13 +0200
commitd1dc91832e7f867d72e40adc6f01b9f75e7010bd (patch)
tree355fc26ae0dde8fb32e88baa3f4756ad4cf26eee
parent5ce5deb7ea92ea610fc9c302add710a1d3ea91c5 (diff)
downloadnspr-hg-d1dc91832e7f867d72e40adc6f01b9f75e7010bd.tar.gz
bug 1373866 - consistently hold the pr_wp.ml lock while accessing pr_wp.opHead r=kaie
-rw-r--r--pr/src/md/unix/uxproces.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pr/src/md/unix/uxproces.c b/pr/src/md/unix/uxproces.c
index cc991298..5286b9e1 100644
--- a/pr/src/md/unix/uxproces.c
+++ b/pr/src/md/unix/uxproces.c
@@ -624,8 +624,8 @@ static void WaitPidDaemonThread(void *unused)
} while (sizeof(buf) == rv || (-1 == rv && EINTR == errno));
#ifdef _PR_SHARE_CLONES
- PR_Unlock(pr_wp.ml);
while ((op = pr_wp.opHead) != NULL) {
+ PR_Unlock(pr_wp.ml);
op->process = ForkAndExec(op->path, op->argv,
op->envp, op->attr);
if (NULL == op->process) {
@@ -639,8 +639,8 @@ static void WaitPidDaemonThread(void *unused)
}
op->done = PR_TRUE;
PR_NotifyCondVar(op->doneCV);
- PR_Unlock(pr_wp.ml);
}
+ PR_Unlock(pr_wp.ml);
#endif
while (1) {