]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dyld_process_info_notify.dtest/target.c
55fd668c8aa39f9c6914ac5cecd2a8fced83d89a
[apple/dyld.git] / testing / test-cases / dyld_process_info_notify.dtest / target.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <dlfcn.h>
5 #include <signal.h>
6 #include <unistd.h>
7 #include <mach/mach.h>
8
9
10
11 int main(int argc, const char* argv[])
12 {
13 if ( (argc > 1) && (strcmp(argv[1], "suspend-in-main") == 0) )
14 (void)kill(getpid(), SIGSTOP);
15
16 for (int i=0; i < 3; ++i) {
17 void* h = dlopen("./libfoo.dylib", 0);
18 dlclose(h);
19 }
20
21 return 0;
22 }
23