From 1bdb456ee7767a75d266716459a85743740acc33 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Nov 2019 00:25:47 -0800 Subject: [PATCH] bug fixe --- pipe.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pipe.cc b/pipe.cc index 37bb0dc6..b915c792 100644 --- a/pipe.cc +++ b/pipe.cc @@ -1,7 +1,9 @@ #include "common.h" #include #include "model.h" +#include "snapshot-interface.h" #include +#include static int (*pipe_init_p)(int filep[2]) = NULL; @@ -12,11 +14,12 @@ int pipe(int fildes[2]) { model->startChecker(); } if (!pipe_init_p) { - pipe_init_p = (int (*)(int file[2])) dlsym(RTLD_NEXT, "pipe"); - if ((error = dlerror()) != NULL) { + pipe_init_p = (int (*)(int fildes[2])) dlsym(RTLD_NEXT, "pipe"); + char *error = dlerror(); + if (error != NULL) { fputs(error, stderr); exit(EXIT_FAILURE); } } - pipe_init_p(filedes); + return pipe_init_p(fildes); } -- 2.34.1