#[cfg(unix)]
mod unix;
#[cfg(unix)]
pub(crate) use unix::{
detect_impl,
is_daemon_impl,
};
#[cfg(windows)]
mod windows;
#[cfg(windows)]
pub(crate) use windows::{
detect_impl,
is_daemon_impl,
};
#[cfg(not(any(unix, windows)))]
mod fallback;
#[cfg(not(any(unix, windows)))]
pub(crate) use fallback::{
detect_impl,
is_daemon_impl,
};
#[cfg(target_os = "linux")]
#[must_use]
pub fn systemd_available() -> bool {
std::path::Path::new("/run/systemd/system").exists()
}
#[cfg(not(target_os = "linux"))]
#[must_use]
pub fn systemd_available() -> bool {
false
}