Skip to content

Commit

Permalink
String.string String.isspace -> String.trim
Browse files Browse the repository at this point in the history
Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information
johnelse committed Apr 29, 2016
1 parent 4359ec1 commit 54f0b2f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ocaml/xapi/xapi_gpumon.ml
Expand Up @@ -16,7 +16,6 @@ module D = Debug.Make(struct let name="xapi" end)
open D

open Fun
open Xstringext
open Threadext

let service = "/sbin/service"
Expand All @@ -26,9 +25,8 @@ let pidfile = "/var/run/xcp-rrdd-gpumon.pid"
let get_pid () =
try
let pid =
(* TODO: Use String.trim when porting this to OCaml 4.x *)
Unixext.string_of_file pidfile
|> String.strip String.isspace
|> String.trim
|> int_of_string
in
Unix.kill pid 0;
Expand Down

0 comments on commit 54f0b2f

Please sign in to comment.