* win32/win32.c (kill): set errno after calling raise().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2003-05-20 04:32:52 +00:00
parent 7f425b216b
commit 3b68b107e9
2 changed files with 22 additions and 11 deletions

View file

@ -2541,8 +2541,13 @@ kill(int pid, int sig)
if (IsWin95()) pid = -pid;
if ((unsigned int)pid == GetCurrentProcessId() &&
(sig != 0 && sig != SIGKILL))
return raise(sig);
(sig != 0 && sig != SIGKILL)) {
if ((ret = raise(sig)) != 0) {
/* MSVCRT doesn't set errno... */
errno = EINVAL;
}
return ret;
}
switch (sig) {
case 0: