gawk: Retrying Input

1 
1 4.12 Retrying Reads After Certain Input Errors
1 ==============================================
1 
1 This minor node describes a feature that is specific to 'gawk'.
1 
1    When 'gawk' encounters an error while reading input, by default
1 'getline' returns -1, and subsequent attempts to read from that file
1 result in an end-of-file indication.  However, you may optionally
1 instruct 'gawk' to allow I/O to be retried when certain errors are
1 Auto-set::):
1 
1      PROCINFO["INPUT_NAME", "RETRY"] = 1
1 
1    When this element exists, 'gawk' checks the value of the system (C
1 language) 'errno' variable when an I/O error occurs.  If 'errno'
1 indicates a subsequent I/O attempt may succeed, 'getline' instead
1 returns -2 and further calls to 'getline' may succeed.  This applies to
1 the 'errno' values 'EAGAIN', 'EWOULDBLOCK', 'EINTR', or 'ETIMEDOUT'.
1 
1    This feature is useful in conjunction with 'PROCINFO["INPUT_NAME",
1 "READ_TIMEOUT"]' or situations where a file descriptor has been
1 configured to behave in a non-blocking fashion.
1