* win32/win32.c (poll_child_status): set EINVAL to errno when
GetExitCodeProcess() fails with ERROR_INVALID_HANDLE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6874320d20
commit
32c63d1f35
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jun 18 18:09:08 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (poll_child_status): set EINVAL to errno when
|
||||||
|
GetExitCodeProcess() fails with ERROR_INVALID_HANDLE.
|
||||||
|
|
||||||
Wed Jun 18 15:01:18 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Wed Jun 18 15:01:18 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (rb_open_file): fs_encoding and fname_encoding is
|
* io.c (rb_open_file): fs_encoding and fname_encoding is
|
||||||
|
@ -2007,9 +2007,9 @@ is_pipe(SOCKET sock) /* DONT call this for SOCKET! it clains it is PIPE. */
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
RUBY_CRITICAL(
|
RUBY_CRITICAL({
|
||||||
ret = (GetFileType((HANDLE)sock) == FILE_TYPE_PIPE)
|
ret = (GetFileType((HANDLE)sock) == FILE_TYPE_PIPE);
|
||||||
);
|
});
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2857,8 +2857,12 @@ poll_child_status(struct ChildRecord *child, int *stat_loc)
|
|||||||
err = GetLastError();
|
err = GetLastError();
|
||||||
if (err == ERROR_INVALID_PARAMETER)
|
if (err == ERROR_INVALID_PARAMETER)
|
||||||
errno = ECHILD;
|
errno = ECHILD;
|
||||||
|
else {
|
||||||
|
if (GetLastError() == ERROR_INVALID_HANDLE)
|
||||||
|
errno = EINVAL;
|
||||||
else
|
else
|
||||||
errno = map_errno(GetLastError());
|
errno = map_errno(GetLastError());
|
||||||
|
}
|
||||||
CloseChildHandle(child);
|
CloseChildHandle(child);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user