diff mbox series

[02/15] cooker: Ensure commands clean up any parser processes

Message ID 20221229170728.880367-3-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 6569ab64bea35de21acc89053ba76e2828163f3f
Headers show
Series Bitbake server thread enabling | expand

Commit Message

Richard Purdie Dec. 29, 2022, 5:07 p.m. UTC
When finishing a command, we need to ensure any parsing processes that may have
been started are cleaned up before we reset the cooker state.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/cooker.py | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 4e49b0e90b..df31a413d7 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1768,6 +1768,9 @@  class BBCooker:
             self.parser.final_cleanup()
 
     def finishcommand(self):
+        if hasattr(self.parser, 'shutdown'):
+            self.parser.shutdown(clean=False)
+            self.parser.final_cleanup()
         self.state = state.initial
 
     def reset(self):