summaryrefslogtreecommitdiff
path: root/test/nptl/tst-atfork2.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/nptl/tst-atfork2.c')
-rw-r--r--test/nptl/tst-atfork2.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/nptl/tst-atfork2.c b/test/nptl/tst-atfork2.c
new file mode 100644
index 000000000..1c303de63
--- /dev/null
+++ b/test/nptl/tst-atfork2.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <dlfcn.h>
+
+int main(int argc, char *argv[])
+{
+ void *h;
+ pid_t pid;
+
+ h = dlopen("libatfork.so", RTLD_NOW);
+ if (!h)
+ {
+ printf("Failed to open libatfork.so\n");
+ return 1;
+ }
+ dlclose(h);
+
+ if ((pid = fork()) < 0) {
+ printf("Fork failed\n");
+ return 1;
+ }
+
+ return 0;
+}