aboutsummaryrefslogtreecommitdiff
path: root/daemon/Monitor.cpp
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-08-01 13:32:58 +0100
committerJon Medhurst <tixy@linaro.org>2014-08-01 13:33:21 +0100
commitbc8a84cf0b138a2951679581453da7bd93003db6 (patch)
treeb94eb00f90c24063053d99bea588fbbd493076ef /daemon/Monitor.cpp
parentba783f1443773505231ac2808c9a3716c3c2f3ae (diff)
gator: Version 5.19DS-5.19
Signed-off-by: Jon Medhurst <tixy@linaro.org> On branch master Changes not staged for commit: modified: README_Streamline.txt no changes added to commit (use "git add" and/or "git commit -a") Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'daemon/Monitor.cpp')
-rw-r--r--daemon/Monitor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/daemon/Monitor.cpp b/daemon/Monitor.cpp
index 90d5c47..b34a15f 100644
--- a/daemon/Monitor.cpp
+++ b/daemon/Monitor.cpp
@@ -18,8 +18,15 @@ Monitor::Monitor() : mFd(-1) {
}
Monitor::~Monitor() {
- if (mFd >= -1) {
- close(mFd);
+ if (mFd >= 0) {
+ ::close(mFd);
+ }
+}
+
+void Monitor::close() {
+ if (mFd >= 0) {
+ ::close(mFd);
+ mFd = -1;
}
}