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:
parent
189766f68e
commit
21d5c9475b
5 changed files with 120 additions and 47 deletions
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue