mirror of
https://github.com/home-assistant/core
synced 2024-08-02 23:40:32 +02:00
Fix Ctrl+C with Subprocesses
Added KeyboardInterrupt handling back to block_till_stopped method. This is because Keyboard Interrupts are sent to both the parent and child process in no particular order so both need to handle the interrupt.
This commit is contained in:
parent
7eef831ff3
commit
a001780afb
@ -95,7 +95,10 @@ class HomeAssistant(object):
|
||||
'Could not bind to SIGTERM. Are you running in a thread?')
|
||||
|
||||
while not request_shutdown.isSet():
|
||||
time.sleep(1)
|
||||
try:
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
|
||||
self.stop()
|
||||
return RESTART_EXIT_CODE if request_restart.isSet() else 0
|
||||
|
Loading…
Reference in New Issue
Block a user