Commit 245c7240766e65f25db986d5d28da9a9b92826e6

Stefan Sperling 2021-06-17T16:36:47

unveil gmon.out if gotweb is being profiled ok tracey

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 3a689cd..eb1b093 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -308,6 +308,10 @@ gw_apply_unveil(const char *repo_path)
 {
 	const struct got_error *err;
 
+#ifdef PROFILE
+	if (unveil("gmon.out", "rwc") != 0)
+		return got_error_from_errno2("unveil", "gmon.out");
+#endif
 	if (repo_path && unveil(repo_path, "r") != 0)
 		return got_error_from_errno2("unveil", repo_path);