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 | 7181f8988ab71eee24196b32f7d825d6c8b895f6 (patch) | |
| tree | c67ed3f46de130948f05e585217c8e22dcd099d6 /win32 | |
| parent | a59b244d032fc5e30891c2700b52683a464eda81 (diff) | |
| download | ruby-7181f8988ab71eee24196b32f7d825d6c8b895f6.tar.gz ruby-7181f8988ab71eee24196b32f7d825d6c8b895f6.tar.xz ruby-7181f8988ab71eee24196b32f7d825d6c8b895f6.zip | |
* win32/win32.c (kill): set errno after calling raise().
git-svn-id: http://svn.ruby-lang.org/repos/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 da785c78b..1441a25c2 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: |
