From d5674fca15249c3c4676ca6cbacecbd7d9e1486d Mon Sep 17 00:00:00 2001 From: Artur Frysiak Date: Fri, 6 Jul 2001 17:05:36 +0000 Subject: [PATCH] sanity (or paranoid) check Changed files: cyrus-imapd-checkfd.patch -> 1.1 --- cyrus-imapd-checkfd.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cyrus-imapd-checkfd.patch diff --git a/cyrus-imapd-checkfd.patch b/cyrus-imapd-checkfd.patch new file mode 100644 index 0000000..596425e --- /dev/null +++ b/cyrus-imapd-checkfd.patch @@ -0,0 +1,20 @@ +--- cyrus-imapd-2.0.14/master/master.c.wiget Fri Jun 22 08:35:25 2001 ++++ cyrus-imapd-2.0.14/master/master.c Fri Jun 22 08:38:08 2001 +@@ -1279,7 +1279,7 @@ + int y = Services[i].socket; + int j; + +- if (FD_ISSET(x, &rfds)) { ++ if (x > 0 && FD_ISSET(x, &rfds)) { + r = read(x, &msg, sizeof(int)); + if (r != sizeof(int)) { + syslog(LOG_ERR, "got weird response from child: %x", i); +@@ -1299,7 +1299,7 @@ + } + + if (Services[i].ready_workers == 0 && +- FD_ISSET(y, &rfds)) { ++ y > 0 && FD_ISSET(y, &rfds)) { + /* huh, someone wants to talk to us */ + spawn_service(&Services[i]); + } -- 2.44.0