From aac88aab720d169bacc49702f18996a5929a7f5d Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 16 Sep 2009 19:06:29 +0200 Subject: grapher: Handle the death of the child stap process * grapher/grapher.c (main): Set up signal and i/o handlers to detect death of child. * grapher/StapParser.cxx (errIoCallback): New method --- grapher/StapParser.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'grapher/StapParser.hxx') diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index e11e7302..f4f6bdef 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -12,12 +12,15 @@ class StapParser CSVData _csv; Gtk::Window& _win; GraphWidget& _widget; + int _errFd; public: StapParser(Gtk::Window& win, - GraphWidget& widget) : _win(win), _widget(widget) {} + GraphWidget& widget) : _win(win), _widget(widget), _errFd(-1) {} void parseData(std::tr1::shared_ptr gdata, double time, const std::string& dataString); bool ioCallback(Glib::IOCondition ioCondition); - + bool errIoCallback(Glib::IOCondition ioCondition); + int getErrFd() { return _errFd; } + void setErrFd(int fd) { _errFd = fd; } }; } -- cgit