EI> I found out that a behavior which I am not sure is a bug in wxKill.
EI> According to the documentation, using the wxKILL_CHILDREN flag will kill the
EI> process, as well as its children.
EI> But what if these children have children too? in such case, my program
EI> leaves an orphan processes in the system.
EI>
EI> I think a new flag should be added wxKILL_TREE - this will kill the process
EI> tree and not just the direct children.
Could you please check if wxKILL_CHILDREN already behaves like this under
Unix? I think it should, in which case we don't need a new flag but just to
fix the existing code.
EI> The current implementation for windows, is doing the following logic:
EI> - take a snapshot of the system processes
EI> - iterate over the processes, each process that it parent process id matches
EI> the process we want to kill, kill it as well.
EI>
EI> To kill the process tree, another test should be added:
EI> - in every iteration, check not only against the process id we want to kill,
EI> but also against the child processes we already killed.
As usual, patches to implement this would be welcome (once the question
above is resolved).
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
On Wed, 20 Jun 2007 08:58:34 +0300 Eran Ifrah <eran....@gmail.com> wrote:
EI> I found out that a behavior which I am not sure is a bug in wxKill.
EI> According to the documentation, using the wxKILL_CHILDREN flag will kill the
EI> process, as well as its children.
EI> But what if these children have children too? in such case, my program
EI> leaves an orphan processes in the system.
EI>
EI> I think a new flag should be added wxKILL_TREE - this will kill the process
EI> tree and not just the direct children.
Could you please check if wxKILL_CHILDREN already behaves like this under
Unix? I think it should, in which case we don't need a new flag but just to
fix the existing code.
EI> The current implementation for windows, is doing the following logic:
EI> - take a snapshot of the system processes
EI> - iterate over the processes, each process that it parent process id matches
EI> the process we want to kill, kill it as well.
EI>
EI> To kill the process tree, another test should be added:
EI> - in every iteration, check not only against the process id we want to kill,
EI> but also against the child processes we already killed.
As usual, patches to implement this would be welcome (once the question
above is resolved).
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org