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:
parent
21bc923aa3
commit
7ded2e28f2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user