Check for EINTR and turn it into KeyboardInterrupt

in err_errno().
This commit is contained in:
Guido van Rossum 1991-10-20 20:14:56 +00:00
parent d26d9ed2ec
commit 5063bab973

View file

@ -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)));