summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-07 00:09:59 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-07 00:09:59 +0200
commit2f357920ffd58e7b56940c64ab8d14a83a27b9f1 (patch)
tree648a2faa13032101a45d09a468d559eeeee4e9d5
parenta5dab5ce0fd4aafc394afe30eda0e6b01a13256b (diff)
util: don't fail if we cannot close valgrind's fds
-rw-r--r--util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/util.c b/util.c
index f3af9567cf..03c60af98d 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;