diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
commit | aff03b0a67c41cf7af5df9c9eef715a8b27a2667 (patch) | |
tree | aa2909ae4718f81c83c8cfb68c1f5a23485b3173 /memory/jemalloc/src/test/unit/fork.c | |
parent | bdb4ff581677ad1cd411b55a68c87534f9a64882 (diff) | |
parent | 11caf6ecb3cb8c84d2355a6c6e9580a290147e92 (diff) | |
download | UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.gz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.lz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.xz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_dom_performance-resource-timing_1
Diffstat (limited to 'memory/jemalloc/src/test/unit/fork.c')
-rw-r--r-- | memory/jemalloc/src/test/unit/fork.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/memory/jemalloc/src/test/unit/fork.c b/memory/jemalloc/src/test/unit/fork.c deleted file mode 100644 index c530797c4..000000000 --- a/memory/jemalloc/src/test/unit/fork.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "test/jemalloc_test.h" - -#ifndef _WIN32 -#include <sys/wait.h> -#endif - -TEST_BEGIN(test_fork) -{ -#ifndef _WIN32 - void *p; - pid_t pid; - - p = malloc(1); - assert_ptr_not_null(p, "Unexpected malloc() failure"); - - pid = fork(); - - free(p); - - p = malloc(64); - assert_ptr_not_null(p, "Unexpected malloc() failure"); - free(p); - - if (pid == -1) { - /* Error. */ - test_fail("Unexpected fork() failure"); - } else if (pid == 0) { - /* Child. */ - _exit(0); - } else { - int status; - - /* Parent. */ - while (true) { - if (waitpid(pid, &status, 0) == -1) - test_fail("Unexpected waitpid() failure"); - if (WIFSIGNALED(status)) { - test_fail("Unexpected child termination due to " - "signal %d", WTERMSIG(status)); - break; - } - if (WIFEXITED(status)) { - if (WEXITSTATUS(status) != 0) { - test_fail( - "Unexpected child exit value %d", - WEXITSTATUS(status)); - } - break; - } - } - } -#else - test_skip("fork(2) is irrelevant to Windows"); -#endif -} -TEST_END - -int -main(void) -{ - - return (test( - test_fork)); -} |