#define FORKEDCALL_H
#include <boost/shared_ptr.hpp>
-#include <boost/signals/signal2.hpp>
-#include <boost/function/function0.hpp>
+#include <boost/signal.hpp>
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
-#include <sys/types.h>
namespace lyx {
namespace support {
* we can return easily to C++ methods, rather than just globally
* accessible functions.
*/
- typedef boost::signal2<void, pid_t, int> SignalType;
+ typedef boost::signal<void(pid_t, int)> SignalType;
/** The signal is connected in the calling routine to the desired
* slot. We pass a shared_ptr rather than a reference to the signal
void kill(int tolerance = 5);
protected:
- /** Wait for child process to finish.
- * Returns returncode from child.
- */
- int runBlocking();
- /** Do not wait for child process to finish.
+ /** Spawn the child process.
* Returns returncode from child.
*/
- int runNonBlocking();
+ int run(Starttype type);
/// Callback function
SignalTypePtr signal_;