diff options
author | git <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-30 03:33:51 +0900 |
---|---|---|
committer | git <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-30 03:33:51 +0900 |
commit | ae3a9862048135f846f694b98031cf264889580f (patch) | |
tree | 8d30f30443e5b5b0db71bc0ede66c2dc3dcc691e /win32/win32.c | |
parent | 09022b6d70ad16737964e58db039aac00a1488ea (diff) | |
download | ruby-ae3a9862048135f846f694b98031cf264889580f.tar.gz |
* expand tabs.
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/win32/win32.c b/win32/win32.c index 2e3f6c4fe0..d14b903077 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6142,22 +6142,22 @@ rb_w32_getppid(void) 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; - } + 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) |