3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
13 #include "ControlForks.h"
17 #include "funcrequest.h"
19 #include "support/forkedcontr.h"
20 #include "support/tostr.h"
22 #include <boost/bind.hpp>
24 using namespace lyx::support;
29 ControlForks::ControlForks(LyXView & lv, Dialogs & d)
30 : ControlDialogBI(lv, d)
34 vector<pid_t> const ControlForks::getPIDs() const
36 return ForkedcallsController::get().getPIDs();
40 string const ControlForks::getCommand(pid_t pid) const
42 return ForkedcallsController::get().getCommand(pid);
46 void ControlForks::kill(pid_t pid)
52 void ControlForks::apply()
54 if (!bufferIsAvailable())
63 for (vector<pid_t>::const_iterator it = pids_.begin();
64 it != pids_.end(); ++it) {
65 lyxfunc().dispatch(FuncRequest(LFUN_FORKS_KILL, tostr(*it)));
72 void ControlForks::setParams()
74 if (childrenChanged_.connected())
79 ForkedcallsController & fcc = ForkedcallsController::get();
81 fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
85 void ControlForks::clearParams()
88 childrenChanged_.disconnect();