1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-25 18:50:18 +03:00

util: don't fail if we cannot close valgrind's fds

This commit is contained in:
Lennart Poettering 2010-04-07 00:09:59 +02:00
parent a5dab5ce0f
commit 2f357920ff

9
util.c
View File

@ -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;