#include "support/bind.h"
#include <cerrno>
+#include <cstring>
+#include <list>
#include <queue>
#include <sstream>
#include <utility>
/// 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();
///
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;
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();