Skip to content

Commit

Permalink
Update basereload.py
Browse files Browse the repository at this point in the history
Change CTRL_C_EVENT to the SIGINT signal, as PyCharm does not handle CTRL_C_EVENT signals
  • Loading branch information
liuyiyangwang authored Jan 21, 2024
1 parent b0092cb commit e67ed12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uvicorn/supervisors/basereload.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def restart(self) -> None:
if sys.platform == "win32": # pragma: py-not-win32
self.is_restarting = True
assert self.process.pid is not None
os.kill(self.process.pid, signal.CTRL_C_EVENT)
os.kill(self.process.pid, signal.SIGINT)
else: # pragma: py-win32
self.process.terminate()
self.process.join()
Expand Down

0 comments on commit e67ed12

Please sign in to comment.