summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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-30 08:43:36 +0100
commit8b7aa5bfd6a53444df60d789c6a7ed2387e7b4c1 (patch)
tree07250d8990d76e437e4d03b571f2cb4fb9e8ed4b /bitbake/lib
parent25e52d34d06f800b38824fc21799dc43b31093f2 (diff)
downloadpoky-8b7aa5bfd6a53444df60d789c6a7ed2387e7b4c1.tar.gz
bitbake: process: Ensure ConnectionReader/Writer have fileno() and close() methods
Expose the underlying close() and fileno() methods which allow connection monitoring and cleanup. (Bitbake rev: f79187f4ebfad7969be47b429995e7f7a3e33c1e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/server/process.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 1975bd445f..8a7c43160a 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -523,6 +523,10 @@ class ConnectionReader(object):
523 def fileno(self): 523 def fileno(self):
524 return self.reader.fileno() 524 return self.reader.fileno()
525 525
526 def close(self):
527 return self.reader.close()
528
529
526class ConnectionWriter(object): 530class ConnectionWriter(object):
527 531
528 def __init__(self, fd): 532 def __init__(self, fd):
@@ -536,3 +540,8 @@ class ConnectionWriter(object):
536 with self.wlock: 540 with self.wlock:
537 self.writer.send_bytes(obj) 541 self.writer.send_bytes(obj)
538 542
543 def fileno(self):
544 return self.writer.fileno()
545
546 def close(self):
547 return self.writer.close()