From 42546d3f2c59f80abe43484fc93a111dbbfcc19e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 23 Oct 2009 16:50:40 +0000 Subject: [PATCH] Disable forking on Mac OS X. This should fix crashes on Snow Leopard. It would be better to * detect OS X version at run time (how??) or * use proper threads for autosave git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31696 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ForkedCalls.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index d1f6c35738..592053b6cf 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -192,7 +192,13 @@ void ForkedProcess::kill(int tol) pid_t ForkedProcess::fork() { -#if !defined (HAVE_FORK) +/* FIXME fork() is not usable on Mac OS X 10.6 (snow leopard) + * Use something else like threads. + * + * Since I do not know how to determine at run time what is the OS X + * version, I just disable forking altogether for now (JMarc) + */ +#if !defined (HAVE_FORK) || defined(__APPLE__) return -1; #else pid_t pid = ::fork(); -- 2.39.2