summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c9
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: