aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 15:32:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 15:54:02 +0100
commitf79187f4ebfad7969be47b429995e7f7a3e33c1e (patch)
treebe4b889b33b0aa847a71d385c4a3b00b647a01a3
parent45cff5734ba2ba8c8d36d17d722a5804d39b258b (diff)
downloadbitbake-contrib-f79187f4ebfad7969be47b429995e7f7a3e33c1e.tar.gz
process: Ensure ConnectionReader/Writer have fileno() and close() methods
Expose the underlying close() and fileno() methods which allow connection monitoring and cleanup. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 1975bd445..8a7c43160 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -523,6 +523,10 @@ class ConnectionReader(object):
def fileno(self):
return self.reader.fileno()
+ def close(self):
+ return self.reader.close()
+
+
class ConnectionWriter(object):
def __init__(self, fd):
@@ -536,3 +540,8 @@ class ConnectionWriter(object):
with self.wlock:
self.writer.send_bytes(obj)
+ def fileno(self):
+ return self.writer.fileno()
+
+ def close(self):
+ return self.writer.close()