Attachment "read.patch" to
ticket [219402ffff]
added by
dkf
2001-03-23 22:10:40.
Index: doc/read.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/read.n,v
retrieving revision 1.5
diff -u -r1.5 read.n
--- doc/read.n 2000/09/07 14:27:50 1.5
+++ doc/read.n 2001/03/23 15:08:28
@@ -51,6 +51,24 @@
See the \fBfconfigure\fR manual entry for a discussion on ways in
which \fBfconfigure\fR will alter input.
+.SH "USE WITH SERIAL PORTS"
+For most applications a serial port should be configured as
+nonblocking: \fBfconfigure \fIchannelId \fB\-blocking \fI0\fR. Then
+\fBread\fR behaves much like described above. Care must be taken when
+using \fBread\fR on blocking serial ports:
+.TP
+\fBread \fIchannelId numChars\fR
+.
+In this form \fBread\fR blocks until \fInumChars\fR have been received
+from the serial port.
+.TP
+\fBread \fIchannelId\fR
+.
+In this form \fBread\fR blocks until the reception of the end-of-file
+character, see \fBfconfigure -eofchar\fR. If there no end-of-file
+character has been configured for the channel, then \fBread\fR will
+block forever.
+
.SH "SEE ALSO"
file(n), eof(n), fblocked(n), fconfigure(n)