tlog: fix dead lock when forking

This commit is contained in:
Nick Peng
2022-06-25 20:25:20 +08:00
parent 5006059074
commit db328640c8

View File

@@ -929,6 +929,11 @@ static void _tlog_close_all_fd(void)
struct dirent *ent;
int dir_fd = -1;
#ifndef __USE_POSIX
/* patch for musl, may cause deadlock when call readdir */
goto errout;
#endif
snprintf(path_name, sizeof(path_name), "/proc/self/fd/");
dir = opendir(path_name);
if (dir == NULL) {