Revert previous change; krb5int_cm_call_select is used by the KDC, and should
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Apr 2007 07:04:39 +0000 (07:04 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Apr 2007 07:04:39 +0000 (07:04 +0000)
return when interrupted by a signal.  Instead, check for EINTR in service_fds
and call krb5int_cm_call_select again.

ticket: 5440

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19457 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/sendto_kdc.c

index e41ab89ba57dc0b07f6c00f0c5f241aed2d857c5..a476ef400d1f0f6ad53c57c89e4539fde9303b97 100644 (file)
@@ -506,7 +506,6 @@ krb5int_cm_call_select (const struct select_state *in,
     e = getcurtime(&now);
     if (e)
        return e;
-try_again:
     if (out->end_time.tv_sec == 0)
        timo = 0;
     else {
@@ -537,11 +536,8 @@ try_again:
     else
        dprint(":%F\n", &out->rfds, &out->wfds, &out->xfds, out->max);
 
-    if (*sret < 0) {
-       if (e == EINTR)
-           goto try_again;
+    if (*sret < 0)
        return e;
-    }
     return 0;
 }
 
@@ -1049,10 +1045,15 @@ service_fds (struct select_state *selstate,
     int e, selret;
 
     e = 0;
-    while (selstate->nfds > 0
-          && (e = krb5int_cm_call_select(selstate, seltemp, &selret)) == 0) {
+    while (selstate->nfds > 0) {
        int i;
 
+       e = krb5int_cm_call_select(selstate, seltemp, &selret);
+       if (e == EINTR)
+           continue;
+       if (e != 0)
+           break;
+
        dprint("service_fds examining results, selret=%d\n", selret);
 
        if (selret == 0)