From: Lennart Poettering Date: Tue, 6 Apr 2010 22:09:59 +0000 (+0200) Subject: util: don't fail if we cannot close valgrind's fds X-Git-Tag: 0.git+20100605+dfd8ee-1~239 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f357920ffd58e7b56940c64ab8d14a83a27b9f1;p=systemd util: don't fail if we cannot close valgrind's fds --- diff --git a/util.c b/util.c index f3af9567..03c60af9 100644 --- a/util.c +++ b/util.c @@ -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;