Commit 16878e79 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'dlopen' into 'master'



check dlopen errors

See merge request zdvresearch_bsc/adafs!40

Signed-off-by: default avatarMarc Vef <vef@uni-mainz.de>
parents a39c1f03 c1255030
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -66,6 +66,11 @@ void* libc_dup3;

void init_passthrough_() {
    libc = dlopen("libc.so.6", RTLD_LAZY);
    if(libc == nullptr){
        std::cerr << "ERROR: failed opening glibc shared object: " << dlerror() << std::endl;
        exit(EXIT_FAILURE);
    }

    libc_open = dlsym(libc, "open");
//    libc_fopen = dlsym(libc, "fopen");
//    libc_fopen64 = dlsym(libc, "fopen64");