[MLton-devel] cvs commit: OS.IO.poll bug fix

Stephen Weeks sweeks@users.sourceforge.net
Fri, 06 Jun 2003 13:12:58 -0700


sweeks      03/06/06 13:12:58

  Modified:    doc      changelog
               runtime/basis/OS/IO poll.c
  Log:
  Fixed bug in OS.IO.poll that caused it to return the input event types
  polled for instead of what was actually available.

Revision  Changes    Path
1.42      +4 -0      mlton/doc/changelog

Index: changelog
===================================================================
RCS file: /cvsroot/mlton/mlton/doc/changelog,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- changelog	4 Jun 2003 20:57:56 -0000	1.41
+++ changelog	6 Jun 2003 20:12:56 -0000	1.42
@@ -2,6 +2,10 @@
 
 At this point, the only missing basis library function is "use".
 
+* 2003-06-06
+  - Fixed bug in OS.IO.poll that caused it to return the input event
+    types polled for instead of what was actually available.
+
 * 2003-06-04
   - Fixed bug in known case SSA optimization that could case incorrect 
     results in compiled programs.



1.4       +1 -1      mlton/runtime/basis/OS/IO/poll.c

Index: poll.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/basis/OS/IO/poll.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- poll.c	6 Jun 2003 13:40:55 -0000	1.3
+++ poll.c	6 Jun 2003 20:12:57 -0000	1.4
@@ -12,7 +12,7 @@
 	}
 	res = poll(ufds, n, timeout);
 	for (i = 0; i < n; i++) {
-		reventss[i] = ufds[i].events;
+		reventss[i] = ufds[i].revents;
 	}
 	return res;
 }





-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel