mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
Fix check for EINTR
This commit is contained in:
parent
2bc9f35052
commit
af524c4d65
@ -26,7 +26,7 @@ static int buf_writefile(buffer * buf, const char * filename) {
|
|||||||
while (buf->pos != buf->len) {
|
while (buf->pos != buf->len) {
|
||||||
int len = write(fd, buf_getptr(buf, buf->len - buf->pos),
|
int len = write(fd, buf_getptr(buf, buf->len - buf->pos),
|
||||||
buf->len - buf->pos);
|
buf->len - buf->pos);
|
||||||
if (errno == EINTR) {
|
if (len == -1 && errno == EINTR) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user