We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98bcf98 commit d4f260eCopy full SHA for d4f260e
ocaml/xenops/device.ml
@@ -833,9 +833,9 @@ let pid ~xs domid =
833
(* Look up the commandline args for the vncterm pid; *)
834
(* Check that they include the vncterm binary path and the xenstore console path for the supplied domid. *)
835
let is_cmdline_valid domid pid =
836
- let cmdline_path = Printf.sprintf "/proc/%d/cmdline" pid in
837
- let cmdline = Unix.openfile cmdline_path [Unix.O_RDONLY] 0
838
- |> Unixext.try_read_string
+ let cmdline =
+ Printf.sprintf "/proc/%d/cmdline" pid
+ |> Unixext.string_of_file
839
|> String.split '\000'
840
in
841
if (List.mem vncterm_path cmdline) && (List.mem (vnc_console_path domid) cmdline)
0 commit comments