[Mono-bugs] [Bug 79735][Wis] New - Serial stream Read returns 0 on timeout.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Oct 24 16:44:22 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jelle.hissink at c-it.nl.

http://bugzilla.ximian.com/show_bug.cgi?id=79735

--- shadow/79735	2006-10-24 16:44:22.000000000 -0400
+++ shadow/79735.tmp.11470	2006-10-24 16:44:22.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 79735
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: Jelle.Hissink at C-it.nl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Serial stream Read returns 0 on timeout.
+
+Description of Problem:
+
+Please accept my apologies if this report is incorrect or incomplete... As 
+I don't know where to turn for more information an I didn't have time to 
+investigate any further. I just wanted to put the information I have till 
+now out there so here it goes.
+
+The System.IO.Ports.SerialStream class Read method returns 0 if it has a 
+read timeout and the timeout occurs. Previously it returned -1 to indicate 
+a timeout. Msdn states:
+http://msdn2.microsoft.com/en-us/library/system.io.stream.read.aspx
+   Read returns 0 only when there is no more data in the stream and no 
+more is expected (such as a closed socket or end of file).
+I remember Microsoft throwing a TimeOutException.
+
+Actual Results:
+Read returns 0 on a timeout.
+
+Expected Results:
+Shouldn't it throw an exception? (Does 0 still indicate end of stream?)
+I remember Microsoft throwing a TimeOutException
+
+How often does this happen? 
+Always
+
+See also bug: 79722 - SerialPort: read_serial prototypes do not match
+
+Another observation: read_serial() in serial.c does not seem to wait at 
+all, it just returns directly?
+
+Regards,
+Jelle Hissink


More information about the mono-bugs mailing list