cvs commit: ports UPDATING ports/mail/enigmail Makefile distinfo
pkg-message ports/mail/enigmail-thunderbird Makefile
Andriy Gapon
avg at FreeBSD.org
Fri Aug 19 16:12:50 UTC 2011
on 19/08/2011 18:48 Andriy Gapon said the following:
> OK, it seems that the culprit is mozilla/toolkit/xre/glxtest.cpp:
> fire_glxtest_process() forks a new process, but doesn't wait(2) for it.
> So when wait(2) is invoked later it may return a pid of this child before any
> other child.
> Not sure how to fix this or work around it.
> Maybe by adding wait4(WNOHANG) loop to the _MD_InitProcesses code... not sure how
> robust that would be. Or maybe glxtest should use PR_CreateProcess instead of the
> plain fork(2) that it uses now...
I ended up forcing an explicit wait on the glxtest child:
--- mozilla/toolkit/xre/glxtest.cpp.orig 2011-08-19 18:57:10.604870746 +0300
+++ mozilla/toolkit/xre/glxtest.cpp 2011-08-19 18:59:43.620447963 +0300
@@ -51,6 +51,8 @@
// which runs the glxtest() static function. This creates a X connection, a GLX
context, calls glGetString, and writes that
// to the 'write' end of the pipe.
+#include <sys/types.h>
+#include <sys/wait.h>
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
@@ -224,6 +226,7 @@
void fire_glxtest_process()
{
int pfd[2];
+ int status;
if (pipe(pfd) == -1) {
perror("pipe");
exit(EXIT_FAILURE);
@@ -244,4 +247,5 @@
close(pfd[1]);
mozilla::widget::glxtest_pipe = pfd[0];
mozilla::widget::glxtest_pid = pid;
+ waitpid(pid, &status, 0);
}
This patch does help me.
--
Andriy Gapon
More information about the freebsd-gecko
mailing list