Add some functions needed by hydra
This commit is contained in:
parent
edf9eb8181
commit
82e2a070e0
|
@ -54,6 +54,14 @@ public:
|
|||
cv.wait(lk);
|
||||
}
|
||||
|
||||
template<class Rep, class Period>
|
||||
void wait_for(std::condition_variable & cv,
|
||||
const std::chrono::duration<Rep, Period> & duration)
|
||||
{
|
||||
assert(s);
|
||||
cv.wait_for(lk, duration);
|
||||
}
|
||||
|
||||
template<class Rep, class Period, class Predicate>
|
||||
bool wait_for(std::condition_variable & cv,
|
||||
const std::chrono::duration<Rep, Period> & duration,
|
||||
|
|
|
@ -778,6 +778,14 @@ void Pid::setKillSignal(int signal)
|
|||
}
|
||||
|
||||
|
||||
pid_t Pid::release()
|
||||
{
|
||||
pid_t p = pid;
|
||||
pid = -1;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
void killUser(uid_t uid)
|
||||
{
|
||||
debug(format("killing all processes running under uid ‘%1%’") % uid);
|
||||
|
|
|
@ -220,6 +220,7 @@ public:
|
|||
int wait(bool block);
|
||||
void setSeparatePG(bool separatePG);
|
||||
void setKillSignal(int signal);
|
||||
pid_t release();
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue