RESOLVED FIXED Bug 64950
Fix _win32_check_running_pid on natvie windows
https://bugs.webkit.org/show_bug.cgi?id=64950
Summary Fix _win32_check_running_pid on natvie windows
Patrick R. Gansterer
Reported 2011-07-21 08:28:14 PDT
Fix _win32_check_running_pid on natvie windows
Attachments
Patch (1.57 KB, patch)
2011-07-21 08:34 PDT, Patrick R. Gansterer
no flags
Patch (1.74 KB, patch)
2011-07-31 12:04 PDT, Patrick R. Gansterer
no flags
Patrick R. Gansterer
Comment 1 2011-07-21 08:34:21 PDT
Adam Roben (:aroben)
Comment 2 2011-07-27 05:09:56 PDT
Comment on attachment 101595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101595&action=review > Tools/Scripts/webkitpy/common/system/executive.py:254 > - ("szExeFile", ctypes.c_char * 260)] > + ("szExeFile", ctypes.c_char * 260), > + ("th32MemoryBase", ctypes.c_long), > + ("th32AccessKey", ctypes.c_long)] I don't see these new members mentioned here: <http://msdn.microsoft.com/en-us/library/ms684839(v=vs.85).aspx>. Looks like they only exist in the WinCE version of the struct. So I think we need to detect whether we're on WinCE or not. Otherwise won't this break non-CE builds?
Patrick R. Gansterer
Comment 3 2011-07-27 05:49:42 PDT
Comment on attachment 101595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101595&action=review >> Tools/Scripts/webkitpy/common/system/executive.py:254 >> + ("th32AccessKey", ctypes.c_long)] > > I don't see these new members mentioned here: <http://msdn.microsoft.com/en-us/library/ms684839(v=vs.85).aspx>. Looks like they only exist in the WinCE version of the struct. So I think we need to detect whether we're on WinCE or not. Otherwise won't this break non-CE builds? This is not related to WinCE! I try the get the native windows python test all pass on my windows box (german Windwos 7 Professional SP1 64bit). I tried different versions of this patch, but this is the only one which workded for me. :-/ Any idea why the function fails on my box without the two additional members?
Adam Roben (:aroben)
Comment 4 2011-07-27 05:54:40 PDT
Comment on attachment 101595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101595&action=review >>> Tools/Scripts/webkitpy/common/system/executive.py:254 >>> + ("th32AccessKey", ctypes.c_long)] >> >> I don't see these new members mentioned here: <http://msdn.microsoft.com/en-us/library/ms684839(v=vs.85).aspx>. Looks like they only exist in the WinCE version of the struct. So I think we need to detect whether we're on WinCE or not. Otherwise won't this break non-CE builds? > > This is not related to WinCE! > I try the get the native windows python test all pass on my windows box (german Windwos 7 Professional SP1 64bit). > I tried different versions of this patch, but this is the only one which workded for me. :-/ > Any idea why the function fails on my box without the two additional members? Hm, I wonder if we need to be using ctypes.c_wchar instead of ctypes.c_char for the szExeFile parameter? I can't tell from the code whether we're calling Process32FirstW or Process32FirstA.
Patrick R. Gansterer
Comment 5 2011-07-27 06:04:42 PDT
Comment on attachment 101595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101595&action=review >>>> Tools/Scripts/webkitpy/common/system/executive.py:254 >>> >>> I don't see these new members mentioned here: <http://msdn.microsoft.com/en-us/library/ms684839(v=vs.85).aspx>. Looks like they only exist in the WinCE version of the struct. So I think we need to detect whether we're on WinCE or not. Otherwise won't this break non-CE builds? >> >> This is not related to WinCE! >> I try the get the native windows python test all pass on my windows box (german Windwos 7 Professional SP1 64bit). >> I tried different versions of this patch, but this is the only one which workded for me. :-/ >> Any idea why the function fails on my box without the two additional members? > > Hm, I wonder if we need to be using ctypes.c_wchar instead of ctypes.c_char for the szExeFile parameter? I can't tell from the code whether we're calling Process32FirstW or Process32FirstA. There is no Process32FirstA: Form http://msdn.microsoft.com/en-us/library/ms684834%28v=vs.85%29.aspx: Process32FirstW (Unicode) and Process32First (ANSI) So I think we call the ansi version here. A ctypes.sizeof PROCESSENTRY32 also returns the same size as in C code. Does this code work on your box with "natvie python"?
Patrick R. Gansterer
Comment 6 2011-07-31 12:04:53 PDT
Created attachment 102461 [details] Patch Seams to be a problem of 64bit python, not windows :-)
WebKit Review Bot
Comment 7 2011-08-02 07:11:17 PDT
Comment on attachment 102461 [details] Patch Clearing flags on attachment: 102461 Committed r92188: <http://trac.webkit.org/changeset/92188>
WebKit Review Bot
Comment 8 2011-08-02 07:11:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.