Catch Ctrl+D as well

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2021-04-07 16:30:31 +00:00
parent 59ef035bec
commit 4fbcce6303

View file

@ -122,7 +122,7 @@ while running:
l.set_proc_count(int(match.group(2))) l.set_proc_count(int(match.group(2)))
else: else:
print("Invalid command. Type 'help' to see available commands") print("Invalid command. Type 'help' to see available commands")
except KeyboardInterrupt: except (KeyboardInterrupt, EOFError):
print("Please type 'quit' to exit the program") print("Please type 'quit' to exit the program")
l.set_proc_count(0) l.set_proc_count(0)
@ -135,5 +135,5 @@ while shutting_down:
shutting_down = False shutting_down = False
l.stop = True l.stop = True
l.join() l.join()
except KeyboardInterrupt: except (KeyboardInterrupt, EOFError):
print("Please wait untill all workers are done") print("Please wait untill all workers are done")