3

我使用 Apache、mod_fastcgi 和 django.core.servers.fastcgi.runfastcgi 运行我的 django 项目。我收到有关所有例外情况的邮件。

有一个例外,我不知道该怎么办。这是键盘中断。它发生在我的代码的不同位置。为什么会发生?Apache中没有键盘!

4

1 回答 1

0

The exception KeyboardInterrupt is raised when the python process receives a SIGINT signal. Normally, this happens if one types Control-C in a shell (therefore the name), but can also be done programmatically. However, I can't tell you under which circumstances Apache or mod_fastcgi might send this signal. In multi-threaded applications, KeyboardInterrupt may also be raised by subthreads to interrupt the main thread (via thread.interrupt_main()).

于 2010-07-25T00:37:19.243 回答