From af6da548aa14c57da7f17b3a1f2211efdb811d19 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 Jun 2012 12:16:18 +0200 Subject: 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. --- src/tty-ask-password-agent/tty-ask-password-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tty-ask-password-agent') diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 7f537c2740..0dec0629c0 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -368,7 +368,7 @@ static int parse_password(const char *filename, char **wall) { char *password; if (arg_console) - if ((tty_fd = acquire_terminal("/dev/console", false, false, false)) < 0) { + if ((tty_fd = acquire_terminal("/dev/console", false, false, false, (usec_t) -1)) < 0) { r = tty_fd; goto finish; } -- cgit v1.2.3-54-g00ecf