mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
#8862: Fix curses cleanup with getchar is interrupted by a signal.
I have no idea how one would write a test for this. Patch by July Tikhonov.
This commit is contained in:
parent
620e36419a
commit
a39c47aab0
2 changed files with 5 additions and 1 deletions
|
@ -214,6 +214,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal.
|
||||||
|
|
||||||
- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
|
- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
|
||||||
retry the select() loop instead of bailing out. This is because select()
|
retry the select() loop instead of bailing out. This is because select()
|
||||||
can incorrectly report a socket as ready for reading (for example, if it
|
can incorrectly report a socket as ready for reading (for example, if it
|
||||||
|
|
|
@ -885,6 +885,8 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
if (rtn == ERR) {
|
if (rtn == ERR) {
|
||||||
/* getch() returns ERR in nodelay mode */
|
/* getch() returns ERR in nodelay mode */
|
||||||
|
PyErr_CheckSignals();
|
||||||
|
if (!PyErr_Occurred())
|
||||||
PyErr_SetString(PyCursesError, "no input");
|
PyErr_SetString(PyCursesError, "no input");
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (rtn<=255) {
|
} else if (rtn<=255) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue