diff options
Diffstat (limited to 'grapher/StapParser.cxx')
-rw-r--r-- | grapher/StapParser.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index 2513680b..2595e8cc 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -288,4 +288,22 @@ vector<string> commaSplit(const boost::sub_range<Glib::ustring>& range) _inFd, inCond); } + + void StapParser::disconnect() + { + if (_ioConnection.connected()) + _ioConnection.disconnect(); + if (_errIoConnection.connected()) + _errIoConnection.disconnect(); + if (_inFd >= 0) + { + close(_inFd); + _inFd = -1; + } + if (_errFd >= 0) + { + close(_errFd); + _errFd = -1; + } + } } |