* expand tabs.

This commit is contained in:
git 2019-04-30 03:33:51 +09:00
parent 09022b6d70
commit ae3a986204

View File

@ -6142,22 +6142,22 @@ rb_w32_getppid(void)
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnap != INVALID_HANDLE_VALUE) { if (hSnap != INVALID_HANDLE_VALUE) {
BOOL ok; BOOL ok;
PROCESSENTRY32 pe; PROCESSENTRY32 pe;
DWORD pid = GetCurrentProcessId(); DWORD pid = GetCurrentProcessId();
pe.dwSize = sizeof(pe); pe.dwSize = sizeof(pe);
ok = Process32First(hSnap, &pe); ok = Process32First(hSnap, &pe);
while (ok) { while (ok) {
if (pe.th32ProcessID == pid) { if (pe.th32ProcessID == pid) {
ppid = (rb_pid_t)pe.th32ParentProcessID; ppid = (rb_pid_t)pe.th32ParentProcessID;
break; break;
} }
ok = Process32Next(hSnap, &pe); ok = Process32Next(hSnap, &pe);
} }
CloseHandle(hSnap); CloseHandle(hSnap);
if (ppid != 0) { if (ppid != 0) {
return ppid; return ppid;
} }
} }
if (pNtQueryInformationProcess == (query_func *)-1) if (pNtQueryInformationProcess == (query_func *)-1)