Skip to content

Commit

Permalink
DispVM restore: do not spin forever when QubesDB connection is closed
Browse files Browse the repository at this point in the history
This is already quite fatal situation, but do not make it even worse by
spinning in endless loop.

QubesOS/qubes-issues#1389
  • Loading branch information
marmarek committed Nov 7, 2015
1 parent eae2203 commit e2da2b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gui-common/txrx-vchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,16 @@ void wait_for_possible_dispvm_resume() {
}
do {
tmp = qdb_read_watch(qdb);
if (tmp)
if (tmp) {
free(tmp);
} else if (errno == EPIPE) {
/* QubesDB connection closed (crashed?), assume DispVM was
* restored, as it is safer option than aborting the whole
* gui-agent
*/
break;
}

}
while (!tmp); // wait for dom0 to create qubesdb entry
out:
Expand Down

0 comments on commit e2da2b8

Please sign in to comment.