summaryrefslogtreecommitdiffstats
path: root/doc/refchan.n
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2010-03-09 21:13:13 (GMT)
committerandreas_kupries <akupries@shaw.ca>2010-03-09 21:13:13 (GMT)
commit9e9589c93aa74b20f3d626142697dd1687512762 (patch)
treed7537d3bde356fe98e8bbcb212ffc8f84e59dbb3 /doc/refchan.n
parentc06d403baef36b9cefc85590d18795a36bd0427c (diff)
downloadtcl-9e9589c93aa74b20f3d626142697dd1687512762.zip
tcl-9e9589c93aa74b20f3d626142697dd1687512762.tar.gz
tcl-9e9589c93aa74b20f3d626142697dd1687512762.tar.bz2
* generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieux
* doc/refchan.n: <ferrieux@users.sourceforge.net> for debugging and fixing * tests/ioCmd.test: the problem. It is the write-side equivalent to the bug fixed 2009-08-06.
Diffstat (limited to 'doc/refchan.n')
-rw-r--r--doc/refchan.n40
1 files changed, 37 insertions, 3 deletions
diff --git a/doc/refchan.n b/doc/refchan.n
index 42e5588..b2bcabb 100644
--- a/doc/refchan.n
+++ b/doc/refchan.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: refchan.n,v 1.11.2.1 2009/08/06 22:28:44 andreas_kupries Exp $
+'\" RCS: @(#) $Id: refchan.n,v 1.11.2.2 2010/03/09 21:13:13 andreas_kupries Exp $
.so man.macros
.TH refchan n 8.5 Tcl "Tcl Built-In Commands"
.BS
@@ -168,9 +168,43 @@ negative value implies that the write failed. Returning a value
greater than the number of bytes given to the handler, or zero, is
forbidden and will cause the Tcl core to throw an error.
.PP
-If the subcommand throws an error the command which caused its
+To signal that the channel is not able to accept data for writing
+right now, it is necessary to throw the error "EAGAIN", i.e. to either
+.PP
+.CS
+return -code error EAGAIN
+.CE
+or
+.CS
+error EAGAIN
+.CE
+.PP
+For extensibility any error whose value is a negative integer number
+will cause the higher layers to set the C-level variable "\fBerrno\fR"
+to the absolute value of this number, signaling a system error.
+However, note that the exact mapping between these error numbers and
+their meanings is operating system dependent.
+.PP
+For example, while on Linux both
+.PP
+.CS
+return -code error -11
+.CE
+and
+.CS
+error -11
+.CE
+.PP
+are equivalent to the examples above, using the more readable string "EAGAIN",
+this is not true for BSD, where the equivalent number is -35.
+.PP
+The symbolic string however is the same across systems, and internally
+translated to the correct number. No other error value has such a mapping
+to a symbolic string.
+.PP
+If the subcommand throws any other error the command which caused its
invocation (usually \fBputs\fR) will appear to have thrown this error.
-Any exception beyond \fIerror\fR (e.g. \fIbreak\fR, etc.) is treated
+Any exception beyond \fIerror\fR (e.g.\ \fIbreak\fR, etc.) is treated
as and converted to an error.
.RE
.TP