[Bug 46272] Create TaskList and MAP linux PID to wine windows PID

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Dec 12 01:35:36 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=46272

--- Comment #9 from Hans Leidekker <hans at meelstraat.net> ---
(In reply to Zebediah Figura from comment #7)
> (In reply to Hans Leidekker from comment #3)
> > Obviously we can't do server calls in programs. Maybe it would be acceptable
> > to use an unused field from SYSTEM_PROCESS_INFORMATION for this purpose,
> > e.g. dwUnknown4. Then we could retrieve the Unix pid with a call to
> > NtQuerySystemInformation(SystemProcessInformation).
> 
> I think it would make more sense to use an unused value instead, something
> like NtQueryInformationProcess(ProcessUnixPID); what do you think?

For the taskkill case I think it would be better to have it in
SYSTEM_PROCESS_INFORMATION. We're already walking the list of processes so it
requires no extra calls to retrieve the Unix pid. This way we are also
guaranteed to get consistent data because it's all in the same snapshot. A
separate call would open up a race, albeit very unlikely to hit.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list