From 1b9fad80af5504ef03c2a88504dbc47bea003721 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Thu, 10 Dec 2009 21:34:27 +0100 Subject: grapher: integrate graph events from stdin with the stap process framework. This was the original way to do graphing and had bitrotted some. * grapher/StapParser.cxx (initIO): new catchHUP argument (ioCallback): Only disconnect signals, etc. on IN_HUP if catchHUP is true. (errIoCallback): Write error messages to stderr, not stdout. * grapher/grapher.cxx (StapLauncher::launch): Don't catchHUP on our stap process children. (ProcWindow::refresh): Display something reasonable for the stap "process" that is feeding stdin. (main): Use StapParser::initIO to initialize parser reading from stdin. --- grapher/StapParser.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'grapher/StapParser.hxx') diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index 4dd711e6..24e84fc9 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -37,12 +37,13 @@ namespace systemtap int _errFd; int _inFd; unsigned char _lineEndChar; + bool _catchHUP; std::tr1::shared_ptr _process; sigc::connection _ioConnection; sigc::connection _errIoConnection; public: StapParser() - : _errFd(-1), _inFd(-1), _lineEndChar('\n') + : _errFd(-1), _inFd(-1), _lineEndChar('\n'), _catchHUP(false) { } void parseData(std::tr1::shared_ptr gdata, @@ -65,7 +66,7 @@ namespace systemtap { _process = process; } - void initIo(int inFd, int errFd); + void initIo(int inFd, int errFd, bool catchHUP); }; sigc::signal& childDiedSignal(); -- cgit