summaryrefslogtreecommitdiff
path: root/test/nptl/tst-atfork2.c
blob: 1c303de633e540f1b232db3385d6e74b3c4e2c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}