aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Bedarkar <rahulbedarkar89@gmail.com>2014-08-02 15:32:57 +0530
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-08-17 10:30:37 -0500
commitaaec25cba2f57c82a2d3cadf72c9b666a28799bb (patch)
tree39315bbd1b2337ddc7dff77e081ee6657a6c06b6
parent31d79098221bf6f8842cdeee9b962d46d4c1d6da (diff)
downloadman-pages-aaec25cba2f57c82a2d3cadf72c9b666a28799bb.tar.gz
core.5: Close opened file in example program
Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man5/core.51
1 files changed, 1 insertions, 0 deletions
diff --git a/man5/core.5 b/man5/core.5
index 074add6e49..f2c3e36aed 100644
--- a/man5/core.5
+++ b/man5/core.5
@@ -422,6 +422,7 @@ main(int argc, char *argv[])
tot += nread;
fprintf(fp, "Total bytes in core dump: %d\\n", tot);
+ fclose(fp);
exit(EXIT_SUCCESS);
}
.fi