From 3b68b107e9a58e8e42241a7a1330fe9843c8cdbb Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 20 May 2003 04:32:52 +0000 Subject: [PATCH] * 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 --- ChangeLog | 24 +++++++++++++++--------- win32/win32.c | 9 +++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee939ebb14..626314b6b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue May 20 13:29:04 2003 NAKAMURA Usaku + + * win32/win32.c (kill): set errno after calling raise(). + Tue May 20 10:51:26 2003 Nobuyoshi Nakada * eval.c (rb_f_missing): create exception instance by ordinal @@ -14,13 +18,13 @@ Tue May 20 10:51:26 2003 Nobuyoshi Nakada Mon May 19 18:54:30 2003 why the lucky stiff - * lib/token.c, lib/implicit.c: expanded character set to allow UTF-8, - other Ruby encodings. + * ext/syck/token.c, ext/syck/implicit.c: expanded character set to + allow UTF-8, other Ruby encodings. Mon May 19 16:47:00 2003 why the lucky stiff - * lib/syck.c, lib/syck.h, lib/token.c, lib/gram.c: count line numbers - only if line pointer has increased. + * ext/syck/syck.c, ext/syck/syck.h, ext/syck/token.c, ext/syck/gram.c: + count line numbers only if line pointer has increased. Tue May 20 00:45:40 2003 Yukihiro Matsumoto @@ -142,10 +146,11 @@ Fri May 16 12:40:40 2003 Yukihiro Matsumoto Thu May 15 21:55:54 2003 why the lucky stiff - * lib/gram.c: fixes to one-line documents and end of stream documents. + * ext/syck/gram.c: fixes to one-line documents and end of stream + documents. - * lib/syck.c, lib/syck.h: add root_on_error to parser struct, specifying - the symbol to be returned on a parse error. + * ext/syck/syck.c, ext/syck/syck.h: add root_on_error to parser + struct, specifying the symbol to be returned on a parse error. Thu May 15 18:44:31 2003 Tanaka Akira @@ -164,10 +169,11 @@ Thu May 15 16:55:16 2003 Yukihiro Matsumoto Thu May 15 07:45:30 2003 why the lucky stiff - * ext/ruby/ext/syck/rubyext.c, lib/implicit.re: timestamp repairs to + * ext/syck/rubyext.c, ext/syck/implicit.c: timestamp repairs to timezone and milliseconds. - * lib/syck.c (syck_parser_reset_levels): duplicate string literal to avoid warning. + * ext/syck/syck.c (syck_parser_reset_levels): duplicate string literal + to avoid warning. Thu May 15 13:26:48 2003 Yukihiro Matsumoto 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: