summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-11 17:14:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-11 23:14:48 +0000
commit51f732114168d5a689f7baceae74bd68ff6e5745 (patch)
treedce948553e677a3727ec3a801df7f4404611036c /bitbake/lib/bb/cooker.py
parent3a439f94ab61902155eecc86c31b2bd6968b0dbe (diff)
downloadpoky-51f732114168d5a689f7baceae74bd68ff6e5745.tar.gz
bitbake: cooker: Fix exit handling issues
The shutdown() call should definitely not be waiting for idle, since we expect execution and events to continue even after setting either shutdown state. This was causing the UI to appear to hang at Ctrl+C interrupts. Also ensure that if we reset cooker, we stop any active parser processes since these currently appear to be being left behind. (Bitbake rev: 4f73c2eb12ee074f3b7d4717380649f6ca8f3def) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5a0e675b44..cfaa7cbe6c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1743,7 +1743,7 @@ class BBCooker:
1743 return 1743 return
1744 1744
1745 def post_serve(self): 1745 def post_serve(self):
1746 self.shutdown(force=True, idle=False) 1746 self.shutdown(force=True)
1747 prserv.serv.auto_shutdown() 1747 prserv.serv.auto_shutdown()
1748 if hasattr(bb.parse, "siggen"): 1748 if hasattr(bb.parse, "siggen"):
1749 bb.parse.siggen.exit() 1749 bb.parse.siggen.exit()
@@ -1753,17 +1753,14 @@ class BBCooker:
1753 if hasattr(self, "data"): 1753 if hasattr(self, "data"):
1754 bb.event.fire(CookerExit(), self.data) 1754 bb.event.fire(CookerExit(), self.data)
1755 1755
1756 def shutdown(self, force=False, idle=True): 1756 def shutdown(self, force=False):
1757 if force: 1757 if force:
1758 self.state = state.forceshutdown 1758 self.state = state.forceshutdown
1759 else: 1759 else:
1760 self.state = state.shutdown 1760 self.state = state.shutdown
1761 1761
1762 if idle:
1763 self.waitIdle(30)
1764
1765 if self.parser: 1762 if self.parser:
1766 self.parser.shutdown(clean=not force) 1763 self.parser.shutdown(clean=False)
1767 self.parser.final_cleanup() 1764 self.parser.final_cleanup()
1768 1765
1769 def finishcommand(self): 1766 def finishcommand(self):
@@ -1775,6 +1772,7 @@ class BBCooker:
1775 def reset(self): 1772 def reset(self):
1776 if hasattr(bb.parse, "siggen"): 1773 if hasattr(bb.parse, "siggen"):
1777 bb.parse.siggen.exit() 1774 bb.parse.siggen.exit()
1775 self.finishcommand()
1778 self.initConfigurationData() 1776 self.initConfigurationData()
1779 self.handlePRServ() 1777 self.handlePRServ()
1780 1778