Lines 49-55
__FBSDID("$FreeBSD$");
Link Here
|
49 |
#include <stdlib.h> |
49 |
#include <stdlib.h> |
50 |
#include "el.h" |
50 |
#include "el.h" |
51 |
|
51 |
|
52 |
#define OKCMD -1 |
52 |
#define OKCMD 1 |
53 |
|
53 |
|
54 |
private int read__fixio(int, int); |
54 |
private int read__fixio(int, int); |
55 |
private int read_preread(EditLine *); |
55 |
private int read_preread(EditLine *); |
Lines 169-177
read__fixio(int fd __unused, int e)
Link Here
|
169 |
#endif /* TRY_AGAIN */ |
169 |
#endif /* TRY_AGAIN */ |
170 |
return (e ? 0 : -1); |
170 |
return (e ? 0 : -1); |
171 |
|
171 |
|
172 |
case EINTR: |
|
|
173 |
return (0); |
174 |
|
175 |
default: |
172 |
default: |
176 |
return (-1); |
173 |
return (-1); |
177 |
} |
174 |
} |
Lines 295-303
read_char(EditLine *el, char *cp)
Link Here
|
295 |
again: |
292 |
again: |
296 |
el->el_signal->sig_no = 0; |
293 |
el->el_signal->sig_no = 0; |
297 |
while ((num_read = read(el->el_infd, cp, 1)) == -1) { |
294 |
while ((num_read = read(el->el_infd, cp, 1)) == -1) { |
298 |
if (el->el_signal->sig_no == SIGCONT) { |
295 |
if (errno == EINTR) { |
299 |
sig_set(el); |
296 |
if (el->el_signal->sig_no == SIGCONT) { |
300 |
el_set(el, EL_REFRESH); |
297 |
sig_set(el); |
|
|
298 |
el_set(el, EL_REFRESH); |
299 |
} |
301 |
goto again; |
300 |
goto again; |
302 |
} |
301 |
} |
303 |
if (!tried && read__fixio(el->el_infd, errno) == 0) |
302 |
if (!tried && read__fixio(el->el_infd, errno) == 0) |