ruby-changes:5901
From: usa <ko1@a...>
Date: Wed, 18 Jun 2008 18:10:30 +0900 (JST)
Subject: [ruby-changes:5901] Ruby:r17409 (trunk): * win32/win32.c (poll_child_status): set EINVAL to errno when
usa 2008-06-18 18:10:04 +0900 (Wed, 18 Jun 2008) New Revision: 17409 Modified files: trunk/ChangeLog trunk/win32/win32.c Log: * win32/win32.c (poll_child_status): set EINVAL to errno when GetExitCodeProcess() fails with ERROR_INVALID_HANDLE. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/win32/win32.c?r1=17409&r2=17408&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17409&r2=17408&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 17408) +++ ChangeLog (revision 17409) @@ -1,3 +1,8 @@ +Wed Jun 18 18:09:08 2008 NAKAMURA Usaku <usa@r...> + + * 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@r...> * io.c (rb_open_file): fs_encoding and fname_encoding is Index: win32/win32.c =================================================================== --- win32/win32.c (revision 17408) +++ win32/win32.c (revision 17409) @@ -2007,9 +2007,9 @@ { int ret; - RUBY_CRITICAL( - ret = (GetFileType((HANDLE)sock) == FILE_TYPE_PIPE) - ); + RUBY_CRITICAL({ + ret = (GetFileType((HANDLE)sock) == FILE_TYPE_PIPE); + }); return ret; } @@ -2857,8 +2857,12 @@ err = GetLastError(); if (err == ERROR_INVALID_PARAMETER) errno = ECHILD; - else - errno = map_errno(GetLastError()); + else { + if (GetLastError() == ERROR_INVALID_HANDLE) + errno = EINVAL; + else + errno = map_errno(GetLastError()); + } CloseChildHandle(child); return -1; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/