Skip to content

Commit

Permalink
tlog: fix dead lock when forking
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Jun 25, 2022
1 parent 5006059 commit db32864
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit db32864

Please sign in to comment.