chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
669bec5
)
main: newer kernels return EINVAL if we invoke reboot() in a container lacking perms...
author
Lennart Poettering
<lennart@poettering.net>
Mon, 17 Sep 2012 16:28:40 +0000
(18:28 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 17 Sep 2012 17:05:33 +0000
(19:05 +0200)
src/core/manager.c
patch
|
blob
|
history
diff --git
a/src/core/manager.c
b/src/core/manager.c
index b0357b71fdead5df4634f06e31cab4b79ca6e236..cf069171997c4af3138c0ae839e099e3e0f269e8 100644
(file)
--- a/
src/core/manager.c
+++ b/
src/core/manager.c
@@
-138,8
+138,9
@@
static int enable_special_signals(Manager *m) {
assert(m);
/* Enable that we get SIGINT on control-alt-del. In containers
- * this will fail with EPERM, so ignore that. */
- if (reboot(RB_DISABLE_CAD) < 0 && errno != EPERM)
+ * this will fail with EPERM (older) or EINVAL (newer), so
+ * ignore that. */
+ if (reboot(RB_DISABLE_CAD) < 0 && errno != EPERM && errno != EINVAL)
log_warning("Failed to enable ctrl-alt-del handling: %m");
fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY|O_CLOEXEC);