pppd: Handle SIGINT and SIGTERM during interrupted syscalls (#148)
[ppp.git] / pppd / plugins / radius / sendserver.c
index f68aa67f0380617b5941c1c574b9201b2731b30d..0c0ef30f8d37f41309cc395a9d3fad5153130f08 100644 (file)
@@ -302,7 +302,7 @@ int rc_send_server (SEND_DATA *data, char *msg, REQUEST_INFO *info)
                FD_SET (sockfd, &readfds);
                if (select (sockfd + 1, &readfds, NULL, NULL, &authtime) < 0)
                {
-                       if (errno == EINTR)
+                       if (errno == EINTR && !got_sigterm)
                                continue;
                        error("rc_send_server: select: %m");
                        memset (secret, '\0', sizeof (secret));