diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-20 04:32:52 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-20 04:32:52 +0000 |
commit | 3b68b107e9a58e8e42241a7a1330fe9843c8cdbb (patch) | |
tree | c67ed3f46de130948f05e585217c8e22dcd099d6 /win32 | |
parent | 7f425b216b18f44489c46cadcc7186ba4f04cbb7 (diff) | |
download | ruby-3b68b107e9a58e8e42241a7a1330fe9843c8cdbb.tar.gz |
* 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
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index da785c78b8..1441a25c2b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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: |