libstore/gc.cc: ignore ESRCH when reading symlinks in /proc

readlink is also affected by the problem fixed for regular files in
c567afe355df
This commit is contained in:
Symphorien Gibol 2018-06-16 18:04:09 +02:00
parent 8c567afe35
commit ef8122064b

View file

@ -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");
}