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 /builtin.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 'builtin.c')
-rw-r--r-- | builtin.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1683,6 +1683,7 @@ do_printf(int nargs, int redirtype) update_ERRNO_int(EBADF); return; } + (void) close_rp(rp, CLOSE_ALL); fatal(_("printf: attempt to write to closed write end of two-way pipe")); } fp = rp->output.fp; @@ -2119,7 +2120,11 @@ do_system(int nargs) if (do_posix) ; /* leave it alone, full 16 bits */ else if (do_traditional) +#ifdef __MINGW32__ + ret = (((unsigned)status) & ~0xC0000000); +#else ret = (status / 256.0); +#endif else if (WIFEXITED(status)) ret = WEXITSTATUS(status); /* normal exit */ else if (WIFSIGNALED(status)) { @@ -2167,6 +2172,7 @@ do_print(int nargs, int redirtype) update_ERRNO_int(EBADF); return; } + (void) close_rp(rp, CLOSE_ALL); fatal(_("print: attempt to write to closed write end of two-way pipe")); } fp = rp->output.fp; @@ -2245,6 +2251,7 @@ do_print_rec(int nargs, int redirtype) update_ERRNO_int(EBADF); return; } + (void) close_rp(rp, CLOSE_ALL); fatal(_("print: attempt to write to closed write end of two-way pipe")); } fp = rp->output.fp; |