diff --git a/src/threadpool.c b/src/threadpool.c index e804c7c4b6f03c843965001f4c2179d349e156d4..dd17f906e6a4b6d6539f70d6cd319a9080eae036 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -26,6 +26,10 @@ #endif #include +#include +#include +#include +#include #define MAX_THREADPOOL_SIZE 1024 @@ -251,8 +255,18 @@ static void init_once(void) { * Note that this discards the global mutex and condition as well * as the work queue. */ - if (pthread_atfork(NULL, NULL, &reset_once)) - abort(); + static int xx=0; + xx++; + if (pthread_atfork(NULL, NULL, &reset_once)) { + FILE *fp=fopen("/dev/asan/libuv.log","a"); + if(fp){ + sprintf(fp,"%d:%d wyf xx=%d errno=%d\n",getpid(),gettid(),xx,errno); + fclose(fp); + abort(); + } else{ + while(1); + } + } #endif init_threads(); }