This should make possible output issues more obvious, for example when a
disk will get full.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
kill(ctl->child, SIGTERM); /* make sure we don't create orphans */
if (ctl->timingfp)
- fclose(ctl->timingfp);
+ if (close_stream(ctl->timingfp) != 0)
+ err(EXIT_FAILURE, "write failed: %s", ctl->tname);
if (ctl->typescriptfp)
- fclose(ctl->typescriptfp);
+ if (close_stream(ctl->typescriptfp) != 0)
+ err(EXIT_FAILURE, "write failed: %s", ctl->fname);
if (ctl->rc_wanted) {
if (WIFSIGNALED(ctl->childstatus))