diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-04 23:11:19 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-04-04 23:11:19 +0300 |
commit | 1b5d1b8870cb0ac1c4b99f6cf67e3277427df864 (patch) | |
tree | 910c37dfb0821cc23de5402c44e4603d2e734721 /io.c | |
parent | fae30f292fc0e2e67de188f8129d043f9909bd0b (diff) | |
download | egawk-1b5d1b8870cb0ac1c4b99f6cf67e3277427df864.tar.gz egawk-1b5d1b8870cb0ac1c4b99f6cf67e3277427df864.tar.bz2 egawk-1b5d1b8870cb0ac1c4b99f6cf67e3277427df864.zip |
Add warning for fflush of closed write end on 2-way pipe.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1328,7 +1328,7 @@ flush_io() warning(_("error writing standard error (%s)"), strerror(errno)); status++; } - for (rp = red_head; rp != NULL; rp = rp->next) + for (rp = red_head; rp != NULL; rp = rp->next) { /* flush both files and pipes, what the heck */ if ((rp->flag & RED_WRITE) != 0 && rp->output.fp != NULL) { if (rp->output.gawk_fflush(rp->output.fp, rp->output.opaque)) { @@ -1344,6 +1344,7 @@ flush_io() status++; } } + } if (status != 0) status = -1; /* canonicalize it */ return status; |