mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Use the correct API sd_listen_fds to determine whether the process is started by systemd. Change sd_booted to launched_by_systemd to avoid confusion with systemd's API. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Dave Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
25 lines
1019 B
OCaml
25 lines
1019 B
OCaml
(*
|
|
* Copyright (C) 2014 Luis R. Rodriguez <mcgrof@suse.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
* by the Free Software Foundation; version 2.1 only. with the special
|
|
* exception on linking described in file LICENSE.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*)
|
|
|
|
(** Calls the C library sd_listen_fds() function for us. Although
|
|
* the library doesn't accept argument we send one over to help
|
|
* us do sanity checks on the expected sockets *)
|
|
val sd_listen_fds: string -> Unix.file_descr
|
|
|
|
(** Tells us whether the process is launched by systemd *)
|
|
val launched_by_systemd: unit -> bool
|
|
|
|
(** Tells systemd we're ready *)
|
|
external sd_notify_ready: unit -> unit = "ocaml_sd_notify_ready"
|