diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-28 15:32:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-28 15:54:02 +0100 |
commit | f79187f4ebfad7969be47b429995e7f7a3e33c1e (patch) | |
tree | be4b889b33b0aa847a71d385c4a3b00b647a01a3 | |
parent | 45cff5734ba2ba8c8d36d17d722a5804d39b258b (diff) | |
download | bitbake-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.py | 9 |
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() |