We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 695820a commit 86dc456Copy full SHA for 86dc456
1 file changed
uvicorn/supervisors/basereload.py
@@ -90,6 +90,10 @@ def restart(self) -> None:
90
self.is_restarting = True
91
assert self.process.pid is not None
92
os.kill(self.process.pid, signal.CTRL_C_EVENT)
93
+
94
+ # This is a workaround to ensure the Ctrl+C event is processed
95
+ sys.stdout.write(" ") # This has to be a non-empty string
96
+ sys.stdout.flush()
97
else: # pragma: py-win32
98
self.process.terminate()
99
self.process.join()
0 commit comments