Fixed possible segmentation faults in StopAll()
This commit is contained in:
parent
cddf0192f6
commit
eb6c4ecbcb
1 changed files with 8 additions and 7 deletions
|
@ -518,8 +518,9 @@ void Util::Procs::Stop(pid_t name){
|
|||
|
||||
/// (Attempts to) stop all running child processes.
|
||||
void Util::Procs::StopAll(){
|
||||
std::map<pid_t, std::string> listcopy = plist;
|
||||
std::map<pid_t, std::string>::iterator it;
|
||||
for (it = plist.begin(); it != plist.end(); it++){
|
||||
for (it = listcopy.begin(); it != listcopy.end(); it++){
|
||||
Stop(( *it).first);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue