Commit 740f9751 by Christophe Lyon Committed by Christophe Lyon

[testsuite] asan/clone-test-1.c: Handle clone() failure

2016-07-04  Christophe Lyon  <christophe.lyon@linaro.org>

	* c-c++-common/asan/clone-test-1.c (main): Handle clone() failure.

From-SVN: r237987
parent 097e8994
2016-07-04 Christophe Lyon <christophe.lyon@linaro.org>
* c-c++-common/asan/clone-test-1.c (main): Handle clone() failure.
2016-07-04 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.target/s390/vector/vec-scalar-cmp-1.c: Expect lochi instead of
......
......@@ -29,6 +29,10 @@ int main(int argc, char **argv) {
char *sp = child_stack + kStackSize; /* Stack grows down. */
printf("Parent: %p\n", sp);
pid_t clone_pid = clone(Child, sp, CLONE_FILES | CLONE_VM, NULL, 0, 0, 0);
if (clone_pid == -1) {
perror("clone");
return 1;
}
int status;
pid_t wait_result = waitpid(clone_pid, &status, __WCLONE);
if (wait_result < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment