MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / do_fork_thd

Function do_fork_thd

deps/jemalloc/test/unit/fork.c:76–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75#ifndef _WIN32
76static void *
77do_fork_thd(void *arg) {
78 malloc(1);
79 int pid = fork();
80 if (pid == -1) {
81 /* Error. */
82 test_fail("Unexpected fork() failure");
83 } else if (pid == 0) {
84 /* Child. */
85 char *args[] = {"true", NULL};
86 execvp(args[0], args);
87 test_fail("Exec failed");
88 } else {
89 /* Parent */
90 wait_for_child_exit(pid);
91 }
92 return NULL;
93}
94#endif
95
96#ifndef _WIN32

Callers 1

Calls 3

mallocFunction · 0.85
wait_for_child_exitFunction · 0.85
test_failFunction · 0.50

Tested by

no test coverage detected