From c27baaa090d038f92ea7af89cfa054412bbf8d5d Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 8 Sep 2008 09:17:22 +0000 Subject: * win32/win32.c (getppid): typo. [ruby-dev:36202] * process.c (get_ppid): mention the return value on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'win32/win32.c') diff --git a/win32/win32.c b/win32/win32.c index 7c802aba6b..5774d0c503 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3965,21 +3965,21 @@ rb_w32_getppid(void) HANDLE hNtDll = GetModuleHandle("ntdll.dll"); if (hNtDll) { pNtQueryInformationProcess = (long (WINAPI *)(HANDLE, int, void *, ULONG, ULONG *))GetProcAddress(hNtDll, "NtQueryInformationProcess"); - if (pNtQueryInformationProcess) { - struct { - long ExitStatus; - void* PebBaseAddress; - ULONG AffinityMask; - ULONG BasePriority; - ULONG UniqueProcessId; - ULONG ParentProcessId; - } pbi; - ULONG len; - long ret = pNtQueryInformationProcess(GetCurrentProcess(), 0, &pbi, sizeof(pbi), &len); - if (!ret) { - ppid = pbi.ParentProcessId; - } - } + } + } + if (pNtQueryInformationProcess) { + struct { + long ExitStatus; + void* PebBaseAddress; + ULONG AffinityMask; + ULONG BasePriority; + ULONG UniqueProcessId; + ULONG ParentProcessId; + } pbi; + ULONG len; + long ret = pNtQueryInformationProcess(GetCurrentProcess(), 0, &pbi, sizeof(pbi), &len); + if (!ret) { + ppid = pbi.ParentProcessId; } } } -- cgit v1.2.3