From 7c728b3c7680662fc4e92b5d03697b8339560b08 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 6 Feb 2018 11:40:35 +0100 Subject: Update NSPR to 4.16 --- nsprpub/pr/src/md/unix/uxproces.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'nsprpub/pr/src/md/unix/uxproces.c') diff --git a/nsprpub/pr/src/md/unix/uxproces.c b/nsprpub/pr/src/md/unix/uxproces.c index a3b35e540..5286b9e18 100644 --- a/nsprpub/pr/src/md/unix/uxproces.c +++ b/nsprpub/pr/src/md/unix/uxproces.c @@ -247,13 +247,14 @@ ForkAndExec( PR_DELETE(newEnvp); } return NULL; - } else if (0 == process->md.pid) { /* the child process */ - /* - * If the child process needs to exit, it must call _exit(). - * Do not call exit(), because exit() will flush and close - * the standard I/O file descriptors, and hence corrupt - * the parent process's standard I/O data structures. - */ + } + if (0 == process->md.pid) { /* the child process */ + /* + * If the child process needs to exit, it must call _exit(). + * Do not call exit(), because exit() will flush and close + * the standard I/O file descriptors, and hence corrupt + * the parent process's standard I/O data structures. + */ #if !defined(NTO) && !defined(SYMBIAN) if (attr) { @@ -498,10 +499,9 @@ ExtractExitStatus(int rawExitStatus) #endif if (WIFEXITED(rawExitStatus)) { return WEXITSTATUS(rawExitStatus); - } else { + } PR_ASSERT(WIFSIGNALED(rawExitStatus)); return _PR_SIGNALED_EXITSTATUS; - } } static void @@ -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) { -- cgit v1.2.3