Mercurial > ~astiob > upreckon > hgweb
diff upreckon/_unixmodule.cpp @ 210:8c4e92fb32d8
Keyboard interrupts now satisfy the Press any key to exit... prompt
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 18 Aug 2011 02:51:31 +0300 |
parents | 4f69e30abbd5 |
children | 65b5c9390010 |
line wrap: on
line diff
--- a/upreckon/_unixmodule.cpp Thu Aug 18 02:41:46 2011 +0300 +++ b/upreckon/_unixmodule.cpp Thu Aug 18 02:51:31 2011 +0300 @@ -1276,7 +1276,13 @@ if (catch_escape) { char c; - while (read(0, &c, 1) == -1 && errno == EINTR); + while (read(0, &c, 1) == -1 && errno == EINTR) + { + if (PyErr_CheckSignals() == -1) + { + return NULL; + } + } } #endif Py_RETURN_NONE;