Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/benchmarks/ipc-bench/files/patch-source_common_process.c
16461 views
1
--- source/common/process.c.orig 2022-04-28 15:09:32 UTC
2
+++ source/common/process.c
3
@@ -55,7 +55,7 @@ pid_t start_process(char *argv[]) {
4
// second is an array of arguments, where the
5
// command path has to be included as well
6
// (that's why argv[0] first)
7
- if (execv(argv[0], argv) == -1) {
8
+ if (execvp(argv[0], argv) == -1) {
9
throw("Error opening child process");
10
}
11
}
12
@@ -83,24 +83,18 @@ void start_children(char *prefix, int argc, char *argv
13
char server_name[100];
14
char client_name[100];
15
16
- char *build_path = find_build_path();
17
-
18
// clang-format off
19
sprintf(
20
server_name,
21
- "%s/%s/%s-%s",
22
- build_path,
23
+ "%s-%s",
24
prefix,
25
- prefix,
26
"server"
27
);
28
29
sprintf(
30
client_name,
31
- "%s/%s/%s-%s",
32
- build_path,
33
+ "%s-%s",
34
prefix,
35
- prefix,
36
"client"
37
);
38
// clang-format on
39
@@ -111,5 +105,4 @@ void start_children(char *prefix, int argc, char *argv
40
waitpid(c1_id, NULL, WUNTRACED);
41
waitpid(c2_id, NULL, WUNTRACED);
42
43
- free(build_path);
44
}
45
46