summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-26 12:16:18 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-26 12:21:43 +0200
commitaf6da548aa14c57da7f17b3a1f2211efdb811d19 (patch)
treee118258cb9795ee0b80b656c9aca121cf7bc8b3e /src/core/main.c
parent0c7f15b3a95c3596a4756de5c44eb1fdcd0034fc (diff)
core: make systemd.confirm_spawn=1 actually work
This adds a timeout if the TTY cannot be acquired and makes sure we always output the question to the console, never to the TTY of the respective service.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 8f27a714cc..7c66665e84 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -169,7 +169,7 @@ _noreturn_ static void crash(int sig) {
else if (pid == 0) {
int fd, r;
- if ((fd = acquire_terminal("/dev/console", false, true, true)) < 0)
+ if ((fd = acquire_terminal("/dev/console", false, true, true, (usec_t) -1)) < 0)
log_error("Failed to acquire terminal: %s", strerror(-fd));
else if ((r = make_stdio(fd)) < 0)
log_error("Failed to duplicate terminal fd: %s", strerror(-r));