gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, read_timeout, updated. cd44d957787e162df


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, read_timeout, updated. cd44d957787e162df4348028c22e8b9621000790
Date: Mon, 06 Feb 2012 19:41:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, read_timeout has been updated
       via  cd44d957787e162df4348028c22e8b9621000790 (commit)
      from  7ae469692932aae4a587f746dbff61c1d8b12eb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=cd44d957787e162df4348028c22e8b9621000790

commit cd44d957787e162df4348028c22e8b9621000790
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Feb 6 21:40:45 2012 +0200

    Minor edits to John's changes.

diff --git a/doc/ChangeLog b/doc/ChangeLog
index 2307bde..2bbb982 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,4 +1,9 @@
-2021-02-03         John Haque     <address@hidden>
+2012-02-06         Arnold D. Robbins     <address@hidden>
+
+       * gawk.texi, gawk.1: And some minor edits thereunto.
+
+2012-02-03         John Haque     <address@hidden>
+
        * gawk.texi, gawk.1: Add text on read timeout.
 
 2011-12-28         Arnold D. Robbins     <address@hidden>
diff --git a/doc/gawk.1 b/doc/gawk.1
index eab2046..07a8d0e 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -1131,8 +1131,8 @@ depending on how the elements of the array are to be 
ordered.
 .TP
 \fBPROCINFO["input", "READ_TIMEOUT"]\fP
 specifies the timeout in milliseconds for reading data from
-.I input
-, where
+.IR input ,
+where
 .I input
 is a redirection string or a filename. A value of zero or
 less than zero means no timeout.
@@ -3595,7 +3595,9 @@ and
 .B \-\^\-file
 options.
 .PP
-The GAWK_READ_TIMEOUT environment variable can be used to specify a timeout
+The
+.B GAWK_READ_TIMEOUT
+environment variable can be used to specify a timeout
 in milliseconds for reading input from a terminal, pipe
 or two-way communication including sockets.
 .PP
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 885bf0e..5b3dd71 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -393,7 +393,7 @@ particular records in a file and perform operations upon 
them.
 * Getline Notes::                  Important things to know about
                                    @code{getline}.
 * Getline Summary::                Summary of @code{getline} Variants.
-* Read Timeout::                   Reading input with timeout.
+* Read Timeout::                   Reading input with a timeout.
 * Command line directories::       What happens if you put a directory on the
                                    command line.
 * Print::                          The @code{print} statement.
@@ -3659,7 +3659,7 @@ the value is rounded up to an integral number of seconds.
 
 @item GAWK_READ_TIMEOUT
 Specifies the time, in milliseconds, for @command{gawk} to
-wait for input before returning with error.
+wait for input before returning with an error.
 @xref{Read Timeout}.
 @end table
 
@@ -5143,7 +5143,7 @@ used with it do not have to be named on the @command{awk} 
command line
 * Multiple Line::               Reading multi-line records.
 * Getline::                     Reading files under explicit program control
                                 using the @code{getline} function.
-* Read Timeout::                Reading input with timeout.
+* Read Timeout::                Reading input with a timeout.
 
 * Command line directories::    What happens if you put a directory on the
                                 command line.
@@ -7224,16 +7224,16 @@ and whether the variant is standard or a @command{gawk} 
extension.
 @c ENDOFRANGE infir
 
 @node Read Timeout
address@hidden Reading Input with Timeout
address@hidden Reading Input With A Timeout
 @cindex timeout, reading input
 
 You may specify a timeout in milliseconds for reading input from a terminal,
-pipe or two-way communication including TCP/IP sockets. This can be done
+pipe or two-way communication including, TCP/IP sockets. This can be done
 on a per input, command or connection basis, by setting a special element
 in the @code{PROCINFO} array:
 
 @example
-PROCINFO["input_name", "READ_TIMEOUT"] = timeout in milliseconds
+PROCINFO["input_name", "READ_TIMEOUT"] = @var{timeout in milliseconds}
 @end example
 
 When set, this will cause @command{gawk} to time out and return failure
@@ -7250,8 +7250,9 @@ else if (ERRNO != "")
     print ERRNO
 @end example
 
-Here is how to read interactively from the terminal without waiting
-for more than 5 seconds:
+Here is how to read interactively from the address@hidden assumes
+that standard input is the keyboard} without waiting
+for more than five seconds:
 
 @example
 PROCINFO["/dev/stdin", "READ_TIMEOUT"] = 5000
@@ -7265,7 +7266,8 @@ and set the @code{ERRNO} variable to an appropriate 
string value.
 A negative or zero value for the timeout is the same as specifying
 no timeout at all.
 
-Timeout can also be set for reading from terminal in the implicit loop
+A timeout can also be set for reading from the terminal in the implicit
+loop that reads input records and matches them against patterns,
 like so:
 
 @example
@@ -7275,7 +7277,7 @@ $ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 
5000 @}}
 @print{} You entered: gawk
 @end example
 
-In this case, failure to respond within 5 seconds will result in the following
+In this case, failure to respond within five seconds results in the following
 error message:
 
 @example
@@ -7298,21 +7300,20 @@ while ((Service |& getline) > 0) @{
 
 @quotation NOTE
 You should not assume that the read operation will block
-exactly after the 10th record has been printed. It is possible that
address@hidden will read and buffer more than one record
+exactly after the tenth record has been printed. It is possible that
address@hidden will read and buffer more than one record's
 worth of data the first time. Because of this, changing the value
-of timeout like in the above example has very little usefulness,
-if any at all.
+of timeout like in the above example is not very useful.
 @end quotation
 
 If the @code{PROCINFO} element is not present and the environment
 variable @env{GAWK_READ_TIMEOUT} exists,
-gawk will use it to initialize the timeout value.
address@hidden uses its value to initialize the timeout value.
 The exclusive use of the environment variable to specify timeout
 has the disadvantage of not being able to control it
 on a per command or connection basis.
 
-Gawk considers a timeout event an error even though
address@hidden considers a timeout event to be an error even though
 the attempt to read from the underlying device may
 succeed in a later attempt. This is a limitation, and it also
 means that you cannot use this to multiplex input from
@@ -7326,7 +7327,6 @@ a connection before it can start reading any data,
 or the attempt to open a FIFO special file for reading can block
 indefinitely until some other process opens it for writing.
 
-
 @node Command line directories
 @section Directories On The Command Line
 @cindex directories, command line

-----------------------------------------------------------------------

Summary of changes:
 doc/ChangeLog |    7 ++++++-
 doc/gawk.1    |    8 +++++---
 doc/gawk.texi |   34 +++++++++++++++++-----------------
 3 files changed, 28 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]