mirror of
https://github.com/nicolargo/glances.git
synced 2024-08-17 00:10:48 +03:00
Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #2408
This commit is contained in:
parent
2c5df09983
commit
fef2d86940
@ -156,8 +156,13 @@ def main():
|
||||
Select the mode (standalone, client or server)
|
||||
Run it...
|
||||
"""
|
||||
# SIGHUP not available on Windows (see issue #2408)
|
||||
if sys.platform.startswith('win'):
|
||||
signal_list = (signal.SIGTERM, signal.SIGINT)
|
||||
else:
|
||||
signal_list = (signal.SIGTERM, signal.SIGINT, signal.SIGHUP)
|
||||
# Catch the kill signal
|
||||
for sig in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP):
|
||||
for sig in signal_list:
|
||||
signal.signal(sig, __signal_handler)
|
||||
|
||||
# Log Glances and psutil version
|
||||
|
Loading…
Reference in New Issue
Block a user