Index: head/sys/kgssapi/gss_impl.c =================================================================== --- head/sys/kgssapi/gss_impl.c +++ head/sys/kgssapi/gss_impl.c @@ -112,6 +112,15 @@ cl = clnt_reconnect_create(nconf, (struct sockaddr *) &sun, GSSD, GSSDVERS, RPC_MAXDATASIZE, RPC_MAXDATASIZE); + /* + * The number of retries defaults to INT_MAX, which effectively + * means an infinite, uninterruptable loop. Limiting it to + * five retries keeps it from running forever. + */ + if (cl != NULL) { + int retry_count = 5; + CLNT_CONTROL(cl, CLSET_RETRIES, &retry_count); + } } else cl = NULL; Index: head/usr.sbin/gssd/gssd.c =================================================================== --- head/usr.sbin/gssd/gssd.c +++ head/usr.sbin/gssd/gssd.c @@ -202,6 +202,7 @@ signal(SIGHUP, SIG_IGN); } signal(SIGTERM, gssd_terminate); + signal(SIGPIPE, gssd_terminate); memset(&sun, 0, sizeof sun); sun.sun_family = AF_LOCAL;