1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00

ask-password: fix handling of timeouts when waiting for password

This commit is contained in:
Lennart Poettering 2011-02-23 01:12:29 +01:00
parent 21bc923aa3
commit 7ded2e28f2

View File

@ -111,7 +111,7 @@ int ask_password_tty(
y = now(CLOCK_MONOTONIC);
if (y > until) {
r = -ETIMEDOUT;
r = -ETIME;
goto finish;
}
@ -373,7 +373,7 @@ int ask_password_agent(
goto finish;
}
if ((k = poll(pollfd, _FD_MAX, until-t/USEC_PER_MSEC)) < 0) {
if ((k = poll(pollfd, _FD_MAX, (until-t)/USEC_PER_MSEC)) < 0) {
if (errno == EINTR)
continue;