support: Also return fd when it is 0
[glibc.git] / elf / unload6mod2.c
blob980efa4b0e365f3159bca1243a50543aa8420e37
1 #include <dlfcn.h>
2 #include <stdio.h>
3 #include <unistd.h>
5 static void *h;
7 static void __attribute__((constructor))
8 mod2init (void)
10 h = dlopen ("unload6mod3.so", RTLD_LAZY);
11 if (h == NULL)
13 puts ("dlopen unload6mod3.so failed");
14 fflush (stdout);
15 _exit (1);
19 static void __attribute__((destructor))
20 mod2fini (void)
22 dlclose (h);