diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-07 22:00:09 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-07 22:00:09 +0300 |
commit | d0cea7f12392a0f898dcd26472f1d7a26c71551d (patch) | |
tree | 8cc3f9fac3889f83bddc508871389673c3e1b885 /io.c | |
parent | 62342b5ad8522da5cbc0623f2b645c48b31c2838 (diff) | |
parent | b6fac528542ff95fa89e40a6a4c1da2a7346279b (diff) | |
download | egawk-d0cea7f12392a0f898dcd26472f1d7a26c71551d.tar.gz egawk-d0cea7f12392a0f898dcd26472f1d7a26c71551d.tar.bz2 egawk-d0cea7f12392a0f898dcd26472f1d7a26c71551d.zip |
Merge branch 'master' into feature/cmake
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; |