3#include <zypp/base/LogTools.h>
4#include <zypp/ExternalProgram.h>
10 MIL <<
"Try to acquire an inhibitor lock..." << endl;
11 std::string whyStr =
str::form(
"--why=%s", reason.c_str());
15 "/usr/bin/systemd-inhibit",
16 "--what=sleep:shutdown:idle",
31 MIL <<
"Terminate inhibitor lock: pid " <<
_prog->
getpid() << endl;
ExternalProgramWithStderr & _prog
ExternalProgram extended to change the progress group ID after forking.
bool kill()
Kill the program.
int close()
Wait for the progamm to complete.
shared_ptr< ExternalProgramWithSeperatePgid > _prog
ShutdownLock(const std::string &reason)
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.