summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2003-04-08 22:09:54 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2003-04-08 22:09:54 +0000
commitb171bbd4e503999e039ec112237e0322645a504c (patch)
treeef9e6e99c81f58af884c28a1adadf739b887db71 /libexec
parentfc89301c88195890175f72af5968b2f57b993cff (diff)
more logical handling of select() errors
ok millert@ deraadt@
Diffstat (limited to 'libexec')
-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;