summaryrefslogtreecommitdiff
path: root/rootdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir.c')
-rw-r--r--rootdir.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rootdir.c b/rootdir.c
index c6ddd87..204bc02 100644
--- a/rootdir.c
+++ b/rootdir.c
@@ -422,6 +422,15 @@ static const struct procfs_dir_entry rootdir_entries[] = {
.cleanup_contents = procfs_cleanup_contents_with_free,
},
},
+#ifdef PROFILE
+ /* In order to get a usable gmon.out file, we must apparently use exit(). */
+ {
+ .name = "exit",
+ .ops = {
+ .make_node = exit,
+ },
+ },
+#endif
{}
};