]>
git.saurik.com Git - apple/dyld.git/blob - testing/nocr/nocr.cpp
7 #include "test_support.h"
9 extern const char** environ
;
11 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
13 fprintf(stderr
, "usage: nocr prog args...\n");
18 process
.set_executable_path(argv
[1]);
19 process
.set_args(&argv
[2]);
20 process
.set_env(environ
);
21 process
.set_crash_handler(^(task_t task
) {
24 process
.set_exit_handler(^(pid_t pid
) {
26 (void)waitpid(pid
, &status
, 0);
28 // Only call exit if the child exited normally, otherwise keep running to consume the crash
29 if (WIFEXITED(status
)) {