summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 09:17:22 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 09:17:22 +0000
commitc27baaa090d038f92ea7af89cfa054412bbf8d5d (patch)
treee8d096c988ef48437d304afe81481098b0d2086b /win32
parent1625494febb1039346613868f826d1263acc795d (diff)
* 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
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c30
1 files changed, 15 insertions, 15 deletions
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;
}
}
}