Revision 188a4285 migration.c
b/migration.c | ||
---|---|---|
382 | 382 |
migrate_fd_cleanup(s); |
383 | 383 |
} |
384 | 384 |
|
385 |
int migrate_fd_wait_for_unfreeze(MigrationState *s) |
|
386 |
{ |
|
387 |
int ret; |
|
388 |
|
|
389 |
DPRINTF("wait for unfreeze\n"); |
|
390 |
if (s->state != MIG_STATE_ACTIVE) |
|
391 |
return -EINVAL; |
|
392 |
|
|
393 |
do { |
|
394 |
fd_set wfds; |
|
395 |
|
|
396 |
FD_ZERO(&wfds); |
|
397 |
FD_SET(s->fd, &wfds); |
|
398 |
|
|
399 |
ret = select(s->fd + 1, NULL, &wfds, NULL, NULL); |
|
400 |
} while (ret == -1 && (s->get_error(s)) == EINTR); |
|
401 |
|
|
402 |
if (ret == -1) { |
|
403 |
return -s->get_error(s); |
|
404 |
} |
|
405 |
return 0; |
|
406 |
} |
|
407 |
|
|
408 | 385 |
int migrate_fd_close(MigrationState *s) |
409 | 386 |
{ |
410 | 387 |
int rc = 0; |
Also available in: Unified diff