git.annexia.org
/
virt-top.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b30bcd
)
virt-top: fix to explicitly disconnect from libvirtd
rhel-8.8
author
Yuya Higashi
<higashi.yuya@fujitsu.com>
Tue, 15 Nov 2022 04:56:21 +0000
(13:56 +0900)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 29 Nov 2022 08:15:08 +0000
(08:15 +0000)
To prevent libvirtd from printing virNetSocketReadWire I/O errors when
the virt-top command exits, explicitly disconnect from libvirtd.
Signed-off-by: Yuya Higashi <higashi.yuya@fujitsu.com>
(cherry picked from commit
4b15ee2440b0e70e3c1eb5e164ded493e2d8f0c8
)
src/top.ml
patch
|
blob
|
history
diff --git
a/src/top.ml
b/src/top.ml
index
d4f7697
..
35f10b7
100644
(file)
--- a/
src/top.ml
+++ b/
src/top.ml
@@
-313,7
+313,7
@@
let get_string maxlen =
)
(* Main loop. *)
-let rec main_loop ((
_
, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _)
+let rec main_loop ((
conn
, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _)
as setup) =
let csv_flags = !csv_cpu, !csv_mem, !csv_block, !csv_net in
@@
-379,7
+379,8
@@
let rec main_loop ((_, batch_mode, script_mode, csv_enabled, stream_mode, _, _,
if not !quit || !end_time <> None then
millisleep delay
)
- done
+ done;
+ C.close conn
and get_key_press setup delay =
(* Read the next key, waiting up to 'delay' milliseconds. *)