summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-02-17 17:17:01 -0500
committerdusoleil <howcansocksbereal@gmail.com>2023-02-18 14:06:31 -0500
commit86d5abfa45c0dd0af8fac1f4dca950d5fa9f5e88 (patch)
tree2708c89ac7aecf723c42b50e3fe2666d9f7fa8f2
parent73c0b2de35f9077b03073523a67463d75d63c201 (diff)
downloadsploit-86d5abfa45c0dd0af8fac1f4dca950d5fa9f5e88.tar.gz
sploit-86d5abfa45c0dd0af8fac1f4dca950d5fa9f5e88.zip
comm: Squelch BrokenPipeError during shutdown()
Failure to close target stdout is not interesting. Furthermore, if sploit ever gets into this situation, the user script has likely already raised a more useful error/backtrace. Handling this exception typically results in a duplicate error. Signed-off-by: Malfurious <m@lfurio.us> Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--sploit/comm.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sploit/comm.py b/sploit/comm.py
index 67c97bc..50ef3dc 100644
--- a/sploit/comm.py
+++ b/sploit/comm.py
@@ -18,7 +18,10 @@ class Comm:
self.back = backend
def shutdown(self):
- self.back.stdout.close()
+ try:
+ self.back.stdout.close()
+ except BrokenPipeError:
+ pass
def read(self, size):
data = os.read(self.back.stdin.fileno(), size)