diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1162,10 +1162,15 @@ int close_all_fds(const int except[], unsigned n_except) { continue; } - if ((r = close_nointr(fd)) < 0) - goto finish; + if ((r = close_nointr(fd)) < 0) { + /* Valgrind has its own FD and doesn't want to have it closed */ + if (errno != EBADF) + goto finish; + } } + r = 0; + finish: closedir(d); return r; |