]> git.lyx.org Git - lyx.git/blobdiff - src/support/ForkedCalls.cpp
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / support / ForkedCalls.cpp
index f81c1d20a96764889df90f8a4219662543d79cdf..e6f5a8e9d0f6c8c7cfacd01bc2d0f83f7949615a 100644 (file)
@@ -24,6 +24,8 @@
 #include "support/bind.h"
 
 #include <cerrno>
+#include <cstring>
+#include <list>
 #include <queue>
 #include <sstream>
 #include <utility>
@@ -374,7 +376,7 @@ int ForkedCall::generateChild()
                        argv.push_back(&*it);
                prev = *it;
        }
-       argv.push_back(0);
+       argv.push_back(nullptr);
 
        // Debug output.
        if (lyxerr.debugging(Debug::FILES)) {
@@ -437,18 +439,12 @@ namespace ForkedCallQueue {
 
 /// A process in the queue
 typedef pair<string, ForkedCall::sigPtr> Process;
-/** Add a process to the queue. Processes are forked sequentially
- *  only one is running at a time.
- *  Connect to the returned signal and you'll be informed when
- *  the process has ended.
- */
-ForkedCall::sigPtr add(string const & process);
 
 /// in-progress queue
 static queue<Process> callQueue_;
 
 /// flag whether queue is running
-static bool running_ = 0;
+static bool running_ = false;
 
 ///
 void startCaller();
@@ -457,6 +453,11 @@ void stopCaller();
 ///
 void callback(pid_t, int);
 
+/** Add a process to the queue. Processes are forked sequentially
+ *  only one is running at a time.
+ *  Connect to the returned signal and you'll be informed when
+ *  the process has ended.
+ */
 ForkedCall::sigPtr add(string const & process)
 {
        ForkedCall::sigPtr ptr;
@@ -661,7 +662,7 @@ void handleCompletedProcesses()
                        forkedCalls.erase(it);
                        actCall->emitSignal();
 
-                       /* start all over: emiting the signal can result
+                       /* start all over: emitting the signal can result
                         * in changing the list (Ab)
                         */
                        it = forkedCalls.begin();