From 3e1613e1f7ab589089e8ed5a504330bb9cb128db Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 9 Dec 2009 22:09:39 +0100 Subject: show the status of stap processes in the process window Also, the "kill" button now works. * grapher/StapParser.hxx (_ioConnection, _errIoConnection): new members for sigc connections. (initIo): New function (parsers, parserListChangedSignal): new variables * grapher/StapParser.cxx (ioCallback): disconnect signals when child dies (initIo): new function * grapher/grapher.cxx (StapLauncher): eliminate death callback in favor of childDied signal. Use global parsers list (ProcWindow::_listSelection): new member (ProcWindow::show, hide, onParserListChanged, onSelectionChanged, onKill): new functions (ProcWindow::ProcWindow): Set up cell renderer for status icon * grapher/processwindow.glade: labels for display script and stap arguments --- grapher/StapParser.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'grapher/StapParser.hxx') diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index cfb807a8..4dd711e6 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -38,6 +38,8 @@ namespace systemtap int _inFd; unsigned char _lineEndChar; std::tr1::shared_ptr _process; + sigc::connection _ioConnection; + sigc::connection _errIoConnection; public: StapParser() : _errFd(-1), _inFd(-1), _lineEndChar('\n') @@ -63,7 +65,13 @@ namespace systemtap { _process = process; } + void initIo(int inFd, int errFd); }; sigc::signal& childDiedSignal(); + + typedef std::vector > ParserList; + extern ParserList parsers; + + sigc::signal& parserListChangedSignal(); } -- cgit