[PATCH 1/2] endproc.c: Implement ProcessPage_OnEndProcessTree

Stefan Dösinger stefandoesinger at gmail.com
Tue Apr 11 05:39:04 CDT 2017

Am 2017-04-11 um 12:26 schrieb Stefan Dösinger:
> Is it necessary to store the child processes in a separate list? I'd
> expect that CreateToolhelp32Snapshot creates a snapshot that is not
> affected by changes to the process tree after it returns. If this is the
> case you can kill processes as you iterate over the snapshot with
> Process32Next. This would simplify the code a lot
I've been made aware that Process32First/Next doesn't work with
recursion as it has to store the current iteration position in the
handle. So my idea here doesn't work :-\ .

> If you keep the list please use a wine list from include/wine/list.h.
> This will also give you more flexibility in the order of how you kill
> the processes, see below.
And this idea would mean wrapping a DWORD into a struct list structure,
which is a bit wasteful. So while I do not like custom-written list /
array structures using the dynamic array here is probably the lesser evil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170411/41d4f768/attachment.sig>

More information about the wine-devel mailing list