mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fixes for issue #1114
1. Moved RESTART_EXIT_CODE to constants so it can safely be used by __main__.py. 2. Allowed __main__/main to return the desired exit code. 3. Forwarded the child processes exit code to the parent process to be duplicated. 4. Added —debug flag to pass command to force Home Assistant to run in only one process. A warning is printed to STDERR to indicate HASS is in debug mode. Another is printed if HASS requests a restart in debug mode. A restart request in debug mode will quit. 5. Added an argument to __main__/main/setup_and_run_hass to indicate that it is running in the top process. This tells it to return the exit code rather than exiting.
This commit is contained in:
@@ -197,3 +197,6 @@ HTTP_HEADER_EXPIRES = "Expires"
|
||||
CONTENT_TYPE_JSON = "application/json"
|
||||
CONTENT_TYPE_MULTIPART = 'multipart/x-mixed-replace; boundary={}'
|
||||
CONTENT_TYPE_TEXT_PLAIN = 'text/plain'
|
||||
|
||||
# The exit code to send to request a restart
|
||||
RESTART_EXIT_CODE = 100
|
||||
|
||||
Reference in New Issue
Block a user