2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

v2 fix data loss when dumping semi-closed unix stream connection.

This patch fixes running into loop and data loss, when dumping
semi-closed unix stream connection.

patchv2 has error check, that was missed in v1.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Ruslan Kuprieiev
2013-08-28 16:52:17 +04:00
committed by Pavel Emelyanov
parent 299dba681c
commit 14fff50719
2 changed files with 16 additions and 1 deletions

View File

@@ -737,6 +737,15 @@ static int open_unixsk_standalone(struct unix_sk_info *ui)
return -1;
}
/*
* Restore queue at the one end,
* before closing the second one.
*/
if (restore_sk_queue(sks[1], ui->ue->id)) {
pr_perror("Can't restore socket queue");
return -1;
}
close(sks[1]);
sk = sks[0];
} else {