Son/bigbro/smallbro, But Where Are The Children?


Quiest

I like turtles!
Joined
Sep 2, 2004
Messages
3,411
Age
40
Location
Dteuschland ;)
Okay, I have the following problem:

I want to pause all processes a certain process has created, I used

Code:
signal(son,s_freeze);

but I noticed, that only freezes the last process created.
Is there any way of freezing ALL processes? Like

Code:
signal(children,s_freeze);
//or
signal(sons,s_freeze);

?
 
as far as i can see, there is no such command, you'll probably only make it by creating an array in your process that contains all the id's of all the processes it made...
ir you can make a seperate function of it, simply give the son as argument, and let the function use big bro untill it comes to a process that has no bigbro, and then just freeze all the processes you found that way :)
perhaps you can freeze them as you get them
thus
Code:
process freezesons(son)
begin
  while (son!=0)
    signal(son,s_freeze);
    son = son.bigbro
  end;
end;
variables are still accesable when a process is freezed i think? (well, it can easily be modified if that wouldn't be the case :p )
 
Woot, that seems to be a pretty good solution!

Edit:
Nope, does not work since I have to kill one of the processes before freezing the others, so the !=0 happens too early :(
 
Quiest posted on Sep 13 2005 at 11:25 PM said:
Woot, that seems to be a pretty good solution!

Edit:
Nope, does not work since I have to kill one of the processes before freezing the others, so the !=0 happens too early :(
well, then just either before you terminate it say process.smallbro.bigbro = process.bigbro
and after that do the terminate (so making sure the chain is not destroyed)
or put that yet again in a special function ^^
 
Last edited by a moderator:
Not entirely sure or anything, but I vaguely remember to have used s_kill_tree or s_freeze_tree or something as a parameter, that might do the same thing. Good solution though!
 
Hmm, I saw these on flamingbird.com, but there was no description what they do or atleast I didn`t understand it, so I did not try.

Maybe I`ll try these just to know.
 
that would also work i think, but then you have to also freeze the process that created them, which is not possible if that's the process that's gonna freeze them i think...
or you have to make an in between process for that purpose ^^
 
Back
Top