Commit 5063bab9 authored by Guido van Rossum's avatar Guido van Rossum

Check for EINTR and turn it into KeyboardInterrupt

in err_errno().
parent d26d9ed2
...@@ -148,7 +148,12 @@ object * ...@@ -148,7 +148,12 @@ object *
err_errno(exc) err_errno(exc)
object *exc; object *exc;
{ {
object *v = newtupleobject(2); object *v;
if (errno == EINTR && intrcheck()) {
err_set(KeyboardInterrupt);
return NULL;
}
v = newtupleobject(2);
if (v != NULL) { if (v != NULL) {
settupleitem(v, 0, newintobject((long)errno)); settupleitem(v, 0, newintobject((long)errno));
settupleitem(v, 1, newstringobject(strerror(errno))); settupleitem(v, 1, newstringobject(strerror(errno)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment