]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Fix bug 4463. The crash was due to a call to X from inside a child process.
[lyx.git] / src / Buffer.cpp
index 9003a49a95239358477374900774ba3ee8f724b2..90b47b4e40089c6897e0f7cd85bd8daac60cde9e 100644 (file)
@@ -2076,7 +2076,7 @@ void Buffer::writeParentMacros(odocstream & os) const
                MacroData const * data = 
                d->parent_buffer->getMacro(*it, *this, false);
                if (data)
-                       data->write(os, true);          
+                       data->write(os, true);  
        }
 }
 
@@ -2260,14 +2260,12 @@ private:
 };
 
 
-#if !defined (HAVE_FORK)
-# define fork() -1
-#endif
-
 int AutoSaveBuffer::generateChild()
 {
        // tmp_ret will be located (usually) in /tmp
        // will that be a problem?
+       // Note that this calls ForkedCalls::fork(), so it's
+       // ok cross-platform.
        pid_t const pid = fork();
        // If you want to debug the autosave
        // you should set pid to -1, and comment out the fork.