projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c68867d
)
fd-util: accept that kcmp might fail with EPERM/EACCES
author
Sjoerd Simons
<sjoerd.simons@collabora.co.uk>
Tue, 28 Aug 2018 07:32:18 +0000
(09:32 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 29 Aug 2018 15:53:00 +0000
(17:53 +0200)
In a container the kcmp call might well be blocked; Accept that and fall
back to fstat in that case.
src/basic/fd-util.c
patch
|
blob
|
history
diff --git
a/src/basic/fd-util.c
b/src/basic/fd-util.c
index
e085dc2
..
b97bd19
100644
(file)
--- a/
src/basic/fd-util.c
+++ b/
src/basic/fd-util.c
@@
-277,7
+277,7
@@
int same_fd(int a, int b) {
return true;
if (r > 0)
return false;
- if (
errno != ENOSYS
)
+ if (
!IN_SET(errno, ENOSYS, EACCES, EPERM)
)
return -errno;
/* We don't have kcmp(), use fstat() instead. */