diff options
| author | Arnold D. Robbins <arnold@skeeve.com> | 2023-12-25 22:29:18 +0200 |
|---|---|---|
| committer | Arnold D. Robbins <arnold@skeeve.com> | 2023-12-25 22:29:18 +0200 |
| commit | e9a78cb00374c49d3f2fd26fbe04fc05895b5ea7 (patch) | |
| tree | 6e18a7caf9e0939d78efe0e06d07ebdbe4233a0c | |
| parent | 4217d4bd8600d49335d8a1d2922d5a1ee1921d7c (diff) | |
| download | gawk-e9a78cb00374c49d3f2fd26fbe04fc05895b5ea7.tar.gz | |
Make GAWK_READ_TIMEOUT work correctly.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | io.c | 5 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2024-12-25 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * io.c (get_read_timeout): Make gawk match the doc and have + GAWK_READ_TIMEOUT work if no entry in PROCINFO. Thanks + to Ed Morton for the report. + 2023-12-24 Arnold D. Robbins <arnold@skeeve.com> * debug.c (print_array): Use the subscript as the @@ -4424,7 +4424,7 @@ in_PROCINFO(const char *pidx1, const char *pidx2, NODE **full_idx) static long get_read_timeout(IOBUF *iop) { - long tmout = 0; + long tmout = read_default_timeout; /* initialized from env. variable in init_io() */ if (PROCINFO_node != NULL) { const char *name = iop->public.name; @@ -4448,8 +4448,7 @@ get_read_timeout(IOBUF *iop) (void) force_number(val); tmout = get_number_si(val); } - } else - tmout = read_default_timeout; /* initialized from env. variable in init_io() */ + } /* overwrite read routine only if an extension has not done so */ if ((iop->public.read_func == ( ssize_t(*)() ) read) && tmout > 0) |
