changed to call hawk_rtx_cleario() before restoring SIGPIPE handler in bin/main.c

This commit is contained in:
2020-03-28 08:28:09 +00:00
parent a93beaaf55
commit e54537886c
3 changed files with 10 additions and 5 deletions

View File

@ -1221,6 +1221,11 @@ static HAWK_INLINE int execute_hawk (int argc, hawk_bch_t* argv[])
hawk_rtx_execwithbcstrarr(rtx, (const hawk_bch_t**)arg.icf.ptr, arg.icf.size);
#endif
/* clear unflushed io data - this is also done by hawk_rtx_close().
* but i restore the SIGPIPE handler to the default in unset_intr_run().
* any output after this restoration may cause the program to terminate for unhandled SIGPIPE */
hawk_rtx_cleario (rtx);
unset_intr_run ();
if (retv)