\r
/* It's a python process, so figure out which directory it's in... */\r
hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);\r
- if (hsm == INVALID_HANDLE_VALUE) {\r
- printf("CreateToolhelp32Snapshot[3] failed: %d\n", GetLastError());\r
- CloseHandle(hsp);\r
- return 1;\r
- }\r
+ if (hsm == INVALID_HANDLE_VALUE)\r
+ /* \r
+ * If our module snapshot fails (which will happen if we don't own\r
+ * the process), just ignore it and continue. (It seems different\r
+ * versions of Windows return different values for GetLastError()\r
+ * in this situation; it's easier to just ignore it and move on vs.\r
+ * stopping the build for what could be a false positive.)\r
+ */\r
+ continue;\r
\r
if (!Module32FirstW(hsm, &me)) {\r
printf("Module32FirstW[2] failed: %d\n", GetLastError());\r