summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincent <vincent@openbsd.org>2003-04-08 22:09:53 +0000
committervincent <vincent@openbsd.org>2003-04-08 22:09:53 +0000
commitec6f775001745f260afa2b96b8544d2cc2bb579f (patch)
tree642ab4d665f15ff075052c7e86d313a5db3846b4
parentremember the last M-x compile command used. (diff)
downloadwireguard-openbsd-ec6f775001745f260afa2b96b8544d2cc2bb579f.tar.xz
wireguard-openbsd-ec6f775001745f260afa2b96b8544d2cc2bb579f.zip
more logical handling of select() errors
ok millert@ deraadt@
-rw-r--r--libexec/spamd/spamd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index b4793cfc2ed..2f1175a5914 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.29 2003/03/30 01:50:21 beck Exp $ */
+/* $OpenBSD: spamd.c,v 1.30 2003/04/08 22:09:53 vincent Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -923,8 +923,11 @@ main(int argc, char *argv[])
}
n = select(max+1, fdsr, fdsw, NULL, tvp);
- if (n == -1 && errno == EINTR)
- err(1, "select");
+ if (n == -1) {
+ if (errno != EINTR)
+ err(1, "select");
+ continue;
+ }
if (n == 0)
continue;