Skip to contentSkip to conversation

tools: xenconsole: cleanup when clock_gettime fails.

PATCH In review Ian Campbell 2 participants 3 messages Feb 3, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: xenconsole: cleanup when clock_gettime fails.

All other error paths in the infinite loop in handle_io use break, so as to free resources.

CID: 1351226

---
 tools/console/daemon/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/console/daemon/io.c +1 -1
index e2e7a6b..34666c4 100644
@@ -1053,7 +1053,7 @@ void handle_io(void)
 						 POLLIN|POLLPRI);
 
 		if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
-			return;
+			break;
 		now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
 
 		/* Re-calculate any event counter allowances & unblock
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ian Campbell

All other error paths in the infinite loop in handle_io use break, so as to free resources.

CID: 1351226

Quoted 20 lines
---
 tools/console/daemon/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/console/daemon/io.c +1 -1
index e2e7a6b..34666c4 100644
@@ -1053,7 +1053,7 @@ void handle_io(void)
 						 POLLIN|POLLPRI);
 
 		if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
-			return;
+			break;
 		now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
 
 		/* Re-calculate any event counter allowances & unblock
Signature · 1 line
2.1.4
author Applied
#2 lore raw
Quoted 9 lines · Wei Liu
Quoted 6 lines · Ian Campbell

All other error paths in the infinite loop in handle_io use break, so as to free resources.

CID: 1351226

applied, thanks.

Quoted 5 lines
Quoted 5 lines

---
 tools/console/daemon/io.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 10 lines
tools/console/daemon/io.c +0 -0
index e2e7a6b..34666c4 100644
@@ -1053,7 +1053,7 @@ void handle_io(void)
  						 POLLIN|POLLPRI);


  if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)

tools/console/daemon/io.c +1 -1
-			return;
+			break;
Quoted 4 lines

  now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);

  /* Re-calculate any event counter allowances & unblock

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel