catch poll() returning EINTR.
authorbenno <benno@openbsd.org>
Thu, 20 Jan 2022 17:56:35 +0000 (17:56 +0000)
committerbenno <benno@openbsd.org>
Thu, 20 Jan 2022 17:56:35 +0000 (17:56 +0000)
ok millert@ claudio@

usr.sbin/relayd/ca.c

index ec24eff..5a4e109 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ca.c,v 1.38 2022/01/11 19:06:23 tb Exp $      */
+/*     $OpenBSD: ca.c,v 1.39 2022/01/20 17:56:35 benno Exp $   */
 
 /*
  * Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -356,7 +356,9 @@ rsae_send_imsg(int flen, const u_char *from, u_char *to, RSA *rsa,
        while (!done) {
                switch (poll(pfd, 1, RELAY_TLS_PRIV_TIMEOUT)) {
                case -1:
-                       fatal("%s: poll", __func__);
+                       if (errno != EINTR)
+                               fatal("%s: poll", __func__);
+                       continue;
                case 0:
                        log_warnx("%s: priv%s poll timeout, keyop #%x",
                            __func__,