Configureable timout for applications to close their windows.
Fix 5sec stall when switching from an application to be stopped to an application that was stopped before. Make Xinstance thread safe
This commit is contained in:
11
process.cpp
11
process.cpp
@ -42,11 +42,14 @@ pid_t Process::getPid()
|
||||
|
||||
void Process::stop(bool children)
|
||||
{
|
||||
kill(pid_, SIGSTOP);
|
||||
if(children)
|
||||
if(pid_ > 0)
|
||||
{
|
||||
std::vector<Process> children = getChildren();
|
||||
for(auto& child : children) child.stop(true);
|
||||
kill(pid_, SIGSTOP);
|
||||
if(children)
|
||||
{
|
||||
std::vector<Process> children = getChildren();
|
||||
for(auto& child : children) child.stop(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user