From 0547a787511d53894404d0348891a5fade916f06 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 13 Apr 2007 07:04:39 +0000 Subject: [PATCH] Revert previous change; krb5int_cm_call_select is used by the KDC, and should 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 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index e41ab89ba..a476ef400 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -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) -- 2.26.2