diff --git a/src/backend.c b/src/backend.c
index 2f5d76c0259fdbf2a87fb411e20cf758953a1c0f..f62507ecf18f4aa13a926365909e4a4f42c91ae6 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: backend.c,v 1.56 2000/08/24 04:04:39 hubbe Exp $");
+RCSID("$Id: backend.c,v 1.57 2000/08/28 16:23:59 grubba Exp $");
 #include "fdlib.h"
 #include "backend.h"
 #include <errno.h>
@@ -104,6 +104,13 @@ static struct selectors selectors;
 
 /* Some constants... */
 
+/* Notes on POLLRDNORM and POLLIN:
+ *
+ * According to the AIX manual, POLLIN and POLLRDNORM are both set
+ * if there's a nonpriority message on the read queue. POLLIN is
+ * also set if the message is of 0 length.
+ */
+
 #ifndef POLLRDNORM
 #define POLLRDNORM	POLLIN
 #endif /* !POLLRDNORM */
@@ -295,7 +302,7 @@ void set_read_callback(int fd,file_callback cb,void *data)
   {
 #ifdef HAVE_POLL
     if(!was_set)
-      POLL_FD_SET(fd, POLLRDNORM);
+      POLL_FD_SET(fd, POLLRDNORM|POLLIN);
 #else
     my_FD_SET(fd, &selectors.read);
 #endif
@@ -304,7 +311,7 @@ void set_read_callback(int fd,file_callback cb,void *data)
   }else{
 #ifdef HAVE_POLL
     if(was_set)
-      POLL_FD_CLR(fd, POLLRDNORM);
+      POLL_FD_CLR(fd, POLLRDNORM|POLLIN);
 #else /* !HAVE_POLL */
     if(fd <= max_fd)
     {
@@ -833,11 +840,11 @@ void backend(void)
 #endif /* PIKE_DEBUG */
 	}
 
-	if(active_poll_fds[i].revents & POLLRDNORM) {
+	if(active_poll_fds[i].revents & (POLLRDNORM|POLLIN)) {
 	  if (fds[fd].read.callback) {
 	    (*(fds[fd].read.callback))(fd,fds[fd].read.data);
 	  } else {
-	    POLL_FD_CLR(fd, POLLRDNORM);
+	    POLL_FD_CLR(fd, POLLRDNORM|POLLIN);
 	  }
 #ifdef PIKE_DEBUG
 	  handled = 1;