mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Check for EINTR and turn it into KeyboardInterrupt
in err_errno().
This commit is contained in:
parent
d26d9ed2ec
commit
5063bab973
1 changed files with 6 additions and 1 deletions
|
@ -148,7 +148,12 @@ object *
|
|||
err_errno(exc)
|
||||
object *exc;
|
||||
{
|
||||
object *v = newtupleobject(2);
|
||||
object *v;
|
||||
if (errno == EINTR && intrcheck()) {
|
||||
err_set(KeyboardInterrupt);
|
||||
return NULL;
|
||||
}
|
||||
v = newtupleobject(2);
|
||||
if (v != NULL) {
|
||||
settupleitem(v, 0, newintobject((long)errno));
|
||||
settupleitem(v, 1, newstringobject(strerror(errno)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue