sanitycheck: close pipe file handles
Make sure we close the pipe file handles after we are done, otherwise we will end up with too many open file descriptors and crash... Fixes #20974 Fixes #21637 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
64c84b15ce
commit
bdffb88950
1 changed files with 4 additions and 1 deletions
|
@ -812,12 +812,15 @@ class DeviceHandler(Handler):
|
|||
|
||||
t.join(self.timeout)
|
||||
if t.is_alive():
|
||||
logger.debug("Timed out")
|
||||
logger.debug("Timed out while monitoring serial output on {}".format(self.instance.platform.name))
|
||||
out_state = "timeout"
|
||||
|
||||
if ser.isOpen():
|
||||
ser.close()
|
||||
|
||||
os.close(write_pipe)
|
||||
os.close(read_pipe)
|
||||
|
||||
handler_time = time.time() - start_time
|
||||
|
||||
if out_state == "timeout":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue