diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-07 21:59:34 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-07 21:59:34 +0300 |
commit | b6fac528542ff95fa89e40a6a4c1da2a7346279b (patch) | |
tree | 74932f73f322a7719675f33e3699f61abde16e8c /io.c | |
parent | 43a645fe05c57576d9d41a7f3b18bb55b1dbdc3e (diff) | |
parent | ea1c544208913c0871fb21d9a5d6277d83bf2ef2 (diff) | |
download | egawk-b6fac528542ff95fa89e40a6a4c1da2a7346279b.tar.gz egawk-b6fac528542ff95fa89e40a6a4c1da2a7346279b.tar.bz2 egawk-b6fac528542ff95fa89e40a6a4c1da2a7346279b.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -212,8 +212,6 @@ #define INCREMENT_REC(X) X++ #endif -typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type; - /* Several macros to make the code a bit clearer. */ #define at_eof(iop) (((iop)->flag & IOP_AT_EOF) != 0) #define has_no_data(iop) ((iop)->dataend == NULL) @@ -1233,7 +1231,7 @@ do_close(int nargs) /* close_rp --- separate function to just do closing */ -static int +int close_rp(struct redirect *rp, two_way_close_type how) { int status = 0; @@ -2608,6 +2606,7 @@ do_getline_redir(int into_variable, enum redirval redirtype) update_ERRNO_int(EBADF); return make_number((AWKNUM) -1.0); } + (void) close_rp(rp, CLOSE_ALL); fatal(_("getline: attempt to read from closed read end of two-way pipe")); } iop = rp->iop; |