]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/utils.c
pppd: Handle SIGINT and SIGTERM during interrupted syscalls (#148)
[ppp.git] / pppd / utils.c
index 3602aa61674ab23c538d6e3cebdea511cde42a6e..23189d0ad105bd49f9c00c274ab6340cfd6ffb09 100644 (file)
@@ -835,7 +835,7 @@ complete_read(int fd, void *buf, size_t count)
        for (done = 0; done < count; ) {
                nb = read(fd, ptr, count - done);
                if (nb < 0) {
-                       if (errno == EINTR)
+                       if (errno == EINTR && !got_sigterm)
                                continue;
                        return -1;
                }