diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-10 21:34:27 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-10 21:34:27 +0100 |
commit | 1b9fad80af5504ef03c2a88504dbc47bea003721 (patch) | |
tree | 316616e898f5c4b7375759ac857d3eca1b4beac5 /grapher/StapParser.hxx | |
parent | b35632fd3d2547414c80023c5c60c847e3dc92ea (diff) | |
download | systemtap-steved-1b9fad80af5504ef03c2a88504dbc47bea003721.tar.gz systemtap-steved-1b9fad80af5504ef03c2a88504dbc47bea003721.tar.xz systemtap-steved-1b9fad80af5504ef03c2a88504dbc47bea003721.zip |
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.
Diffstat (limited to 'grapher/StapParser.hxx')
-rw-r--r-- | grapher/StapParser.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
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<StapProcess> _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<GraphDataBase> 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<void, pid_t>& childDiedSignal(); |