Commit b252c891 authored by Alessandro Rubini's avatar Alessandro Rubini

wr_mon: exit if stdout is in error

This is needed if for example it is called in a pipe that is then closed.

meanwhile, remove trailing white space.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 7984da21
......@@ -262,6 +262,9 @@ int main(int argc, char *argv[])
}
if(stats) show_stats();
else show_screen();
/* If we got broken pipe or anything, exit */
if (ferror(stdout))
exit(1);
}
term_restore();
setlinebuf(stdout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment