diff options
author | NAKAMURA Usaku <usa@ruby-lang.org> | 2019-04-30 04:09:07 +0900 |
---|---|---|
committer | NAKAMURA Usaku <usa@ruby-lang.org> | 2019-04-30 04:09:07 +0900 |
commit | 320f0aba49d17737ef965fc8c5f565dad96f514c (patch) | |
tree | f083dc91000921d5ace30c9db6472a270132a8ed /win32 | |
parent | ae3a9862048135f846f694b98031cf264889580f (diff) | |
download | bundler-320f0aba49d17737ef965fc8c5f565dad96f514c.tar.gz |
Revert previous commit; it was meaningless
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/win32/win32.c b/win32/win32.c index d14b903077..cd7abbc6f8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6140,26 +6140,6 @@ rb_w32_getppid(void) static query_func *pNtQueryInformationProcess = (query_func *)-1; rb_pid_t ppid = 0; - HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - if (hSnap != INVALID_HANDLE_VALUE) { - BOOL ok; - PROCESSENTRY32 pe; - DWORD pid = GetCurrentProcessId(); - pe.dwSize = sizeof(pe); - ok = Process32First(hSnap, &pe); - while (ok) { - if (pe.th32ProcessID == pid) { - ppid = (rb_pid_t)pe.th32ParentProcessID; - break; - } - ok = Process32Next(hSnap, &pe); - } - CloseHandle(hSnap); - if (ppid != 0) { - return ppid; - } - } - if (pNtQueryInformationProcess == (query_func *)-1) pNtQueryInformationProcess = (query_func *)get_proc_address("ntdll.dll", "NtQueryInformationProcess", NULL); if (pNtQueryInformationProcess) { |