From ef8122064baf54c37a8fe15e78b9da7c5180bbe6 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 16 Jun 2018 18:04:09 +0200 Subject: [PATCH] libstore/gc.cc: ignore ESRCH when reading symlinks in /proc readlink is also affected by the problem fixed for regular files in c567afe355df --- src/libstore/gc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 233a70bd2..40b4f965f 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -365,7 +365,7 @@ try_again: char buf[bufsiz]; auto res = readlink(file.c_str(), buf, bufsiz); if (res == -1) { - if (errno == ENOENT || errno == EACCES) + if (errno == ENOENT || errno == EACCES || errno == ESRCH) return; throw SysError("reading symlink"); }