aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorjohn haque <j.eh@mchsi.com>2012-02-03 09:20:53 -0600
committerjohn haque <j.eh@mchsi.com>2012-02-03 09:20:53 -0600
commit7ae469692932aae4a587f746dbff61c1d8b12eb9 (patch)
tree90ab4643d22beda1da60d8bdf4138b278a883dc4 /io.c
parentb3dcc664da5e5234af8fbc1e2725788b614c747c (diff)
downloadegawk-7ae469692932aae4a587f746dbff61c1d8b12eb9.tar.gz
egawk-7ae469692932aae4a587f746dbff61c1d8b12eb9.tar.bz2
egawk-7ae469692932aae4a587f746dbff61c1d8b12eb9.zip
Read timeout documentation and bug fix.
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/io.c b/io.c
index 46dba960..25f32e21 100644
--- a/io.c
+++ b/io.c
@@ -3377,9 +3377,12 @@ get_read_timeout(IOBUF *iop)
*/
if (full_idx == NULL || strcmp(name, last_name) != 0) {
val = in_PROCINFO(name, "READ_TIMEOUT", & full_idx);
- last_name = name;
+ if (last_name != NULL)
+ efree(last_name);
+ last_name = estrdup(name, strlen(name));
} else /* use cached full index */
val = in_array(PROCINFO_node, full_idx);
+
if (val != NULL)
tmout = (long) force_number(val);
} else