mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* 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:
parent
7f425b216b
commit
3b68b107e9
2 changed files with 22 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue