Bruno Tavares wrote:
> Mick wrote:
>
>>>But how should Freevo be able to control a child of a child?
>>>
>>>
> Freevo just has to worry on killing all the spwaned childs and it's
> sub-childs. Since most of  the helper processes do not notify anything
> about spwaning sub-childs the only way i see to make this work is to
> assign a process group to all your spawned helper-childs.
> When you send a SIG_WHATEVER to the process group, all the processes
> in that group(including (sub)+-childs) receive it.
> It's full-proof and it eliminates unexpected behaviours from the helpers.

Now you got me. What are process groups? My knowledge says: when a
child dies, the kernel sends SIGCHILD to the parent. The parent than
should 'wait' for it to remove the zombie process. If a process dies,
all children are now children of process 1 (init). So how can you get
information when a child of your child dies? Only your child gets
this. 

>>I wish I knew.. This could more easily be broken into how can any python
>>know the pid of a child of a child.

How can any process know of a child pid of a child (without searching
the process structure in /proc)?

>>I've been searching through python docs and mailing lists and I can't find a
>>solution to this.  Any ideas are welcome.. The fact is any child of a child
>>which does not die when the child is sent SIGTERM is a badley progmramed
>>child, and should be punished ;-).~
>>
> No it's not :) There are plenty of justifiable reasons for this to
> happen. And of course, this should not be punished, the child should
> be spwaned having in mind that it MIGHT spwan a subchild.

But if the child dies, the parent of the subchild is init. Since you
don't know about the subchild, you don't get termination
notification. 


Dischi

-- 
As long as there are ill-defined goals, bizarre bugs, and unrealistic 
schedules, there will be Real Programmers willing to jump in and Solve 
The Problem, saving the documentation for later.


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to