Commit c3301061 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Pål Hermunn Johansen

Bail out of CLI reads on signals

Spotted & prodded by: 	Hermunn
Closes: #2026
parent 78be1d7d
......@@ -155,6 +155,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