зеркало из https://github.com/github/ruby.git
signal.c: preserve errno
* signal.c (sighandler): preserve errno Patch by Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca> [ruby-core:68172] [Bug #10866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f4726dcdaa
Коммит
be5b7f6130
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Feb 25 18:12:11 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* signal.c (sighandler): preserve errno
|
||||||
|
Patch by Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
|
||||||
|
[ruby-core:68172] [Bug #10866]
|
||||||
|
|
||||||
Wed Feb 25 15:59:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 25 15:59:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* dir.c (push_pattern, push_glob): make globbed file names same
|
* dir.c (push_pattern, push_glob): make globbed file names same
|
||||||
|
|
4
signal.c
4
signal.c
|
@ -691,11 +691,15 @@ signal_enque(int sig)
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
sighandler(int sig)
|
sighandler(int sig)
|
||||||
{
|
{
|
||||||
|
int old_errnum = errno;
|
||||||
|
|
||||||
signal_enque(sig);
|
signal_enque(sig);
|
||||||
rb_thread_wakeup_timer_thread();
|
rb_thread_wakeup_timer_thread();
|
||||||
#if !defined(BSD_SIGNAL) && !defined(POSIX_SIGNAL)
|
#if !defined(BSD_SIGNAL) && !defined(POSIX_SIGNAL)
|
||||||
ruby_signal(sig, sighandler);
|
ruby_signal(sig, sighandler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
errno = old_errnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Загрузка…
Ссылка в новой задаче