summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst1
-rw-r--r--libgcompat/readlink.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 188d75c..96de004 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -39,6 +39,7 @@ readlink/realpath
-----------------
* Intercept realpath as well as readlink.
+* Report EIO on /proc read failure.
* Report ENOSYS on dlsym failure.
diff --git a/libgcompat/readlink.c b/libgcompat/readlink.c
index 0db094c..9b3e2dd 100644
--- a/libgcompat/readlink.c
+++ b/libgcompat/readlink.c
@@ -80,6 +80,7 @@ ssize_t readlink(const char *path, char *buf, size_t len)
close(fd);
fail:
exe[0] = '\0';
+ errno = EIO;
return -1;
}