Hermes
0.7.0
Linux game streaming host
Toggle main menu visibility
Loading...
Searching...
No Matches
detached_scope.h
Go to the documentation of this file.
1
5
#pragma once
6
7
#include <chrono>
8
#include <cstddef>
9
#include <string>
10
11
namespace
platf::detached_scope {
12
17
inline
std::string
unit_name
(
long
hermes_pid,
unsigned
launch, std::size_t index) {
18
return
"hermes-app-"
+ std::to_string(hermes_pid) +
'-'
+ std::to_string(launch) +
'-'
+ std::to_string(index) +
".scope"
;
19
}
20
28
inline
std::string
wrap
(
const
std::string &systemd_run,
const
std::string &unit, std::chrono::seconds stop_timeout,
const
std::string &command) {
29
return
systemd_run +
" --user --scope --quiet --collect --unit="
+ unit +
" --property=TimeoutStopSec="
+
30
std::to_string(stop_timeout.count()) +
" -- "
+ command;
31
}
32
33
}
// namespace platf::detached_scope
platf::detached_scope::unit_name
std::string unit_name(long hermes_pid, unsigned launch, std::size_t index)
Definition
detached_scope.h:17
platf::detached_scope::wrap
std::string wrap(const std::string &systemd_run, const std::string &unit, std::chrono::seconds stop_timeout, const std::string &command)
Definition
detached_scope.h:28
src
platform
linux
detached_scope.h
Generated by
1.18.0