Commit 1a2f49f1 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

Use _exit() instead of exit() in child processes

A child process which doesn't call exec() shouldn't use exit(), as that
will attempt to run any atexit handlers of the parent, which may break.
It actually results in crashing with the Mesa radeonsi driver.
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: 's avatarIan Romanick <ian.d.romanick@intel.com>
parent 01c90b0a
......@@ -50,7 +50,7 @@ int main(int argc, char **argv)
pass = try_import_context(0xDEADBEEF, invalid)
&& pass;
exit(pass ? 0 : 1);
_exit(pass ? 0 : 1);
}
/* The test passes if the child exited normally with a return value of
......
......@@ -62,7 +62,7 @@ int main(int argc, char **argv)
XSync(dpy, 0);
pass = validate_glx_error_code(BadAccess, -1);
exit(pass ? 0 : 1);
_exit(pass ? 0 : 1);
}
/* The test passes if the child exited normally with a return value of
......
......@@ -52,7 +52,7 @@ int main(int argc, char **argv)
XSync(dpy, 0);
pass = validate_glx_error_code(Success, -1);
exit(pass ? 0 : 1);
_exit(pass ? 0 : 1);
}
/* The test passes if the child exited normally with a return value of
......
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