Commit 107c4a28 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Bail out of CLI reads on signals

Spotted & prodded by: 	Hermunn
Closes: #2026
parent ee43d2e6
......@@ -119,6 +119,10 @@ read_tmo(int fd, char *ptr, unsigned len, double tmo)
pfd.events = POLLIN;
for (j = 0; len > 0; ) {
i = poll(&pfd, 1, to);
if (i < 0) {
errno = EINTR;
return (-1);
}
if (i == 0) {
errno = ETIMEDOUT;
return (-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment