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>
27 ControlForks::ControlForks(LyXView & lv, Dialogs & d)
28 : ControlDialogBI(lv, d)
32 vector<pid_t> const ControlForks::getPIDs() const
34 return ForkedcallsController::get().getPIDs();
38 string const ControlForks::getCommand(pid_t pid) const
40 return ForkedcallsController::get().getCommand(pid);
44 void ControlForks::kill(pid_t pid)
50 void ControlForks::apply()
52 if (!bufferIsAvailable())
61 for (vector<pid_t>::const_iterator it = pids_.begin();
62 it != pids_.end(); ++it) {
63 lyxfunc().dispatch(FuncRequest(LFUN_FORKS_KILL, tostr(*it)));
70 void ControlForks::setParams()
72 if (childrenChanged_.connected())
77 ForkedcallsController & fcc = ForkedcallsController::get();
79 fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
83 void ControlForks::clearParams()
86 childrenChanged_.disconnect();