summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-15 00:06:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-15 00:06:13 +0000
commit57fb2199059cb55b632d093c2e64c8a3c60acfbb (patch)
treee35e0fb134907d12cee224d3750f4cc00c7b7634 /win32
parentb860144680e3af51f7fc0d7185185a92c4fa6aca (diff)
* reduce UNREACHABLE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 5437cb6c38..84c929d371 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1071,17 +1071,13 @@ child_result(struct ChildRecord *child, int mode)
return -1;
}
- switch (mode) {
- case P_NOWAIT:
- return child->pid;
- case P_OVERLAY:
+ if (mode == P_OVERLAY) {
WaitForSingleObject(child->hProcess, INFINITE);
GetExitCodeProcess(child->hProcess, &exitcode);
CloseChildHandle(child);
_exit(exitcode);
- default:
- UNREACHABLE;
}
+ return child->pid;
}
/* License: Ruby's */