Граф коммитов

195 Коммитов

Автор SHA1 Сообщение Дата
kosaki 521af83558 * signal.c (signal_exec): add volatile to make sure setjmp safe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 09:28:35 +00:00
kosaki 458796d4f1 * signal.c (signal_exec): suppress "warning: variable 'signum'
might be clobbered by 'longjmp' or 'vfork'" warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 09:25:47 +00:00
kosaki f150ed1532 * vm_core.h (rb_thread_struct): added 'in_trap' member for marking
running trap handler.
* signal.c (signal_exec): turn on in_trap when running trap.
* thread.c (Init_Thread, thread_create_core): initialize in_trap
  when creating new threads.
* thread.c (thread_join_m): raise ThreadError when running trap
  handler.Bug [#6416][ruby-core:44956]
* test/ruby/test_thread.rb (test_thread_join_in_trap): new test
  for the above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 08:05:49 +00:00
kosaki 6d9f7672dd * signal.c (rb_get_next_signal): removed pointless signal
disabling. pthread_sigmask() only changes current thread
  mask.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 10:54:55 +00:00
kosaki 562cb0ae59 * signal.c (install_sighandler): added comments why we need
rb_disable_interrupt().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 10:38:02 +00:00
kosaki 75df3aae0f * signal.c (rb_disable_interrupt, rb_enable_interrupt): removed
USE_TRAP_MASK.
* signal.c (trap_arg, trap_ensure): removed.
* signal.c (trap, sig_trap): removed pointless signal disabling.
  We don't need it bacause we no longer run trap hander on signal
  hander context.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 10:35:34 +00:00
kosaki 58282ed667 * signal.c (sig_signame): implements Signal.signame method
[Feature #5613]
* test/ruby/test_signal.rb (test_signame): adds test for above
* NEWS: add an item about above



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 09:43:53 +00:00
ngoto 05a05cc62b * ruby_atomic.h: renamed from atomic.h to avoid header file name conflict
on Solaris 10. [ruby-dev:46414] [Bug #7287]
* gc.c, signal.c, vm_core.h, common.mk: reflect the rename from atomic.h
  to ruby_atomic.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 16:05:07 +00:00
zzak b1228caeff * signal.c (rb_f_kill):
Update documentation for Process.kill to reflect kill(2)
  Patch by Richo Healey


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-13 15:24:05 +00:00
naruse f896ad3b49 * configure.in: Fixing Haiku build.
- -lbe is not required for linking
  - stack protector doesn't work for now because of the default gcc's bug
  by Takashi Toyoshima <toyoshim@gmail.com>
  https://github.com/ruby/ruby/pull/167

* signal.c (ruby_signal): haiku doesn't have SIGBUS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 02:59:24 +00:00
kosaki 3e1d8aab17 * dln.c: Simplify and make consistent an ifdef for Mac OS X.
* ext/socket/rubysocket.h: ditto.
* ext/tk/stubs.c: ditto.
* io.c: ditto.
* process.c: ditto.
* signal.c: ditto.
* vm_dump.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09 15:52:49 +00:00
yugui 76bc2d1ed7 Imports Ruby's port to NativeClient (a.k.a NaCl).
Patch by Google Inc. [ruby-core:45073].

* configure.in (RUBY_NACL): New M4 func to configure variables for
  NaCl.
  (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
  of Pepper interface types.
  (BTESTRUBY): New variable to specify which ruby should be run on
  "make btest". NaCl can run the built binary by sel_ldr, but it need
  rbconfig.rb. So this variable is distinguished from $MINIRUBY.
  
* thread_pthread.c: Disabled some features on NaCl.

* io.c: ditto.

* process.c: ditto.

* signal.c: ditto.

* file.c: ditto.

* missing/flock.c: ditto.

* nacl/pepper_main.c: An example implementation of Pepper application
  that embeds Ruby.

* nacl/example.html: An example of web page that uses the Pepper
  application.

* nacl/nacl-config.rb: Detects variants of NaCl SDK.

* nacl/GNUmakefile.in: Makefile template for NaCl specific build
  process.

* nacl/package.rb: script for packaging a NaCl-Ruby embedding
  application. 

* nacl/reate_nmf.rb: Wrapper script of create_nmf.py

* dln.c (dln_load): Added a hack to call on NaCl.

* util.c (ruby_getcwd): Path to the current directort is not available
  on NaCl.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 02:48:59 +00:00
marcandre 7316302483 * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]
* array.c: Use rb_check_arity / rb_error_arity

* class.c: ditto

* enumerator.c: ditto

* eval.c: ditto

* file.c: ditto

* hash.c: ditto

* numeric.c: ditto

* proc.c: ditto

* process.c: ditto

* random.c: ditto

* re.c: ditto

* signal.c: ditto

* string.c: ditto

* struct.c: ditto

* transcode.c: ditto

* vm_eval.c: ditto

* vm_insnhelper.c: ditto & implementation of rb_error_arity

* test/ruby/test_arity.rb: tests for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-14 21:10:34 +00:00
akr 57e95f86be * signal.c (sig_trap): show signal name on error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23 10:57:55 +00:00
nobu b526738c3b * bignum.c (big_rshift), compile.c (validate_label,
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
  (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
  (rb_io_advise), parse.y (parser_compile_string)
  (rb_parser_compile_file), proc.c (binding_free), process.c
  (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
  (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
  signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
  vm_insnhelper.c (vm_expandarray): suppress
  unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 09:57:00 +00:00
nobu bf0d8b7e64 * signal.c (reserved_signal_p): static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 05:33:49 +00:00
nobu c96c193e1d * atomic.h (ATOMIC_INC, ATOMIC_DEC): return old values.
[ruby-dev:44596] [Bug #5439]
* signal.c (ruby_atomic_exchange): no needs to define on the
  platforms where atomic.h is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-13 20:58:08 +00:00
kosaki 18bc6c31a1 * vm.c (th_init): preallocate alternative stack.
NoMemoryError is better than rb_bug, of course.
  Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].

* signal.c (rb_register_sigaltstack): ditto.

* vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
* vm.c (thread_free): use xfree() instead of free().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 01:57:06 +00:00
kosaki 55b3bfbc4c * signal.c (reserved_signal_p): reverted a part of r32523.
chikanaga noticed trap(:CHLD) has some realworld usecase.
* test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 11:04:58 +00:00
kosaki 7fd8266516 small cleanup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 05:12:29 +00:00
kosaki c307523565 * signal.c (install_sighandler): fixed a race.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 05:08:28 +00:00
kosaki 89e2951bde * signal.c (sig_trap): don't permit to change a signal handler which
the interpreter reserved.
* signal.c (reserved_signal_p): ditto.
  [Bug #2616] [ruby-core:27625]

* test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
  added a test for reserved signal.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 04:55:50 +00:00
kosaki 74b339e938 * thread_pthread.c (rb_thread_create_timer_thread): removed
rb_disable_interrupt()/rb_enable_interrupt().
* vm_core.h: ditto.
* process.c (static void before_exec): ditto.
* process.c (static void after_exec): ditto.
  [Bug #4765] [ruby-dev:43571]

* eval_intern.h: removed rb_trap_restore_mask().
* vm_eval.c (rb_throw_obj): ditto.
* eval.c (setup_exception): ditto.

* signal.c: removed trap_last_mask.
* signal.c (trap_restore_mask): removed.
* signal.c (init_sigchld): comment clarification why signal block
  is needed. and removed trap_last_mask operation.
* signal.c (trap_ensure): removed trap_last_mask operation.

* signal.c (rb_disable_interrupt, rb_enable_interrupt): made
  static and removed sigdelset(SIGVTALARM) and sigdelset(SIGSEGV).

* process.c (rb_syswait): removed implicit signal handler change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 17:04:40 +00:00
kosaki 2acd61551b * signal.c (sigsegv): use abort() instead of exit() when nested
SEGV was happen. Because unnested SEGV use abort().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 07:12:02 +00:00
kosaki 5a73c71dcf * thread_pthread.c (get_stack): add to a care of gurad page on Mac
OS X. [Bug #1813] [ruby-core:24540]
* signal.c (ruby_signal): SIGBUS use alternative stack too.
* signal.c (sigbus): On Mac, thread stack overflow makes SIGBUS
  instead of SIGSEGV. thus, added stackoverflow check.
* signal.c (default_handler): get rid of compilation warning.
* signal.c (Init_signal): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-02 19:59:05 +00:00
ko1 fa4514e4fe * thread.c (rb_threadptr_check_signal): only wake up main thread.
* thread.c (rb_threadptr_execute_interrupts_common): check signal
  deliverly if it is main thread.
  fixes [ruby-dev:44005] [Ruby 1.9 - Bug #4950]
* bootstraptest/test_fork.rb: add a test for above.
* signal.c (rb_get_next_signal): skip if signal_buff is empty.
  (check signal_buff.size first)
* vm_core.h: remove unused variable rb_thread_t::exec_signal.
* thread.c (rb_thread_check_trap_pending): check
  rb_signal_buff_size() because rb_thread_t::exec_signal
  is no longer available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 22:29:34 +00:00
kosaki 0148d41a13 * signal.c: Now, USE_TRAP_SIGMASK depend on HAVE_PTHREAD_SIGMASK.
The code have already depended on pthread_sigmask since r27464.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-28 10:42:25 +00:00
ko1 d1d5d5e798 * thread_pthread.c: Stop polling in the timer thread when there are
no waiting thread.  If there are 2 or more runnable threads,
  the timer thread does polling.  Avoid polling makes power save
  for several computers (0.2W per a Ruby process, when I measured).
  If outside-event such as signal or Thread#kill was occuerred
  when the timer thread does not do polling, then wake-up
  the timer thread using communication-pipe (the timer thread
  waits this communication-pipe with select(2)).
  The discussion about this modification can be found from the post
  [ruby-core:33456] and other related posts.
  Note that Eric Wong and KOSAKI Motohiro give us the huge
  contributions for this modification.  Thanks.
* thread_pthread.c (rb_thread_wakeup_timer_thread): add a function.
  This function wakes up the timer thread using communication-pipe.
* thread.c (rb_thread_stop_timer_thread): add a parameter which
  specify closing communication-pipe or not.
* thread.c (rb_thread_terminate_all): do not stop timer thread here
  (ruby_cleanup() terminate timer thread).
* signal.c: wake up timer thread using
  rb_thread_wakeup_timer_thread() from signal handler.
* eval.c (ruby_cleanup): use rb_thread_stop_timer_thread(1).
* process.c: use rb_thread_stop_timer_thread(0)
  (reuse communication-pipe).
* thread_win32.c (rb_thread_wakeup_timer_thread): add a dummy
  function.
* vm_core.h: add and fix decl. of functions.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-27 00:30:41 +00:00
sorah e6f4c92f6d * signal.c(ruby_atomic_exchange): Fix definement style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 04:33:13 +00:00
kosaki 9d4e471cf9 * vm_core.h (RUBY_VM_SET_TIMER_INTERRUPT, RUBY_VM_SET_INTERRUPT,
RUBY_VM_SET_FINALIZER_INTERRUPT): use atomic ops for preventing
  interrupt_flag bit lost.
* thread.c (rb_threadptr_execute_interrupts_rec): ditto.
* vm_core.h (typedef struct rb_thread_struct): change type of
  interrupt_flag to rb_atomic_t.
* atomic.h: move atomic ops definition from signal.c.
* signal.c: remove atomic ops definition.
* common.mk (gc, signal, thread, cont): add to dependency to atomic.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 14:27:08 +00:00
kosaki e39b50d4b5 * signal.c (Init_signal, default_handler): change default SIGPIPE handler
from empty function to SIG_IGN. [ruby-dev:43215]
* signal.c (sigpipe): removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-28 07:11:54 +00:00
nagachika 29c2876d61 * signal.c (rb_f_kill): accept '-SIGXXX' style signal with Symbol or
implicit convertion with #to_str. [ruby-dev:43169] fixes #4362
* test/ruby/test_signal.rb (test_signal_process_group): add a test
  for send signal to process group.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 13:37:47 +00:00
nobu 3a47cf3395 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
kosaki df52785d30 * signal.c (sig_trap): avoid pthread_sigmask(xx, &mask, &mask) usage
because FreeBSD don't permit it. If it's used, it behave as
  pthread_sigmask(xx, NULL, &mask).

* signal.c (init_sigchld): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-19 18:14:30 +00:00
akr fc38c70ce9 * signal.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-29 01:07:26 +00:00
kosaki 47a1cd1291 * signal.c: change rb_atomic_t definition from uchar to uint.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 06:28:05 +00:00
nobu a5eb40b999 * signal.c (ruby_signal): fix condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 12:30:35 +00:00
nobu 7b410abfb8 * configure.in (rb_cv_gcc_atomic_builtins): check for atomic
builtins, all are not available in Apple derivative gcc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26 00:13:37 +00:00
nobu 3ea90fc38e * signal.c: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-25 23:46:27 +00:00
shyouhei 2c770d676c * signal.c (rb_atomic_t): GCC (of at least recent versions)
has  ubiquitos  support  for  atomic  operations.   On  that
  compiler a C  program can isse a memory  barrier using these
  dedicated  instructions.  According to  the GCC  manual they
  cargo culted  this feature form  the Itanium ABI  so chances
  are that  other compilers  could also support  this feature.
  But so far GCC is the  only compiler that I know to have it.
  Also note that this works on non-Itanium machines.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-25 07:46:53 +00:00
nobu 8022385ba4 * debug.c (ruby_set_debug_option): define always for binary
compatibility with debug env enabled binary.

* signal.c (ruby_enable_coredump): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 02:04:10 +00:00
marcandre 7729de4d91 * array.c: Documentation: change => in call-seq to ->.
Harmonize "#=>" in examples. [ruby-core:30206]

* bignum.c: ditto

* class.c: ditto

* compar.c: ditto

* cont.c: ditto

* dir.c: ditto

* encoding.c: ditto

* enum.c: ditto

* enumerator.c: ditto

* error.c: ditto

* eval.c: ditto

* file.c: ditto

* gc.c: ditto

* io.c: ditto

* load.c: ditto

* marshal.c: ditto

* math.c: ditto

* numeric.c: ditto

* object.c: ditto

* pack.c: ditto

* proc.c: ditto

* process.c: ditto

* random.c: ditto

* range.c: ditto

* re.c: ditto

* ruby.c: ditto

* signal.c: ditto

* sprintf.c: ditto

* string.c: ditto

* struct.c: ditto

* thread.c: ditto

* time.c: ditto

* transcode.c: ditto

* variable.c: ditto

* vm_eval.c: ditto

* vm_method.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 21:07:33 +00:00
mame 50587316b8 * vm_core.c (rb_thread_struct): add a field for sigaltstack.
* thread_pthread.c (thread_start_func_1): initialize machine stack
  information.

* thread.c (thread_start_func_2): set sigaltstack for each sub thread.
  [ruby-core:24540] [ruby-core:30207]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13 16:20:26 +00:00
marcandre 4d3f877180 * signal.c (ruby_signal_name): rdoc fix for undocumented parameter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 04:35:16 +00:00
marcandre 478c3e080b * eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrong
number of arguments

* file.c (rb_f_test, rb_file_s_umask): ditto

* numeric.c (int_chr, num_step): ditto

* process.c (rb_f_sleep): ditto

* re.c (rb_reg_initialize_m): ditto

* signal.c (rb_f_kill, sig_trap): ditto

* string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang,
  rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto

* proc.c (curry): rdoc fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 02:40:57 +00:00
mame 8687db60a6 * process.c (rb_f_fork): remove after_exec() which sometimes caused
two timer threads started.  [ruby-core:25217]

* signal.c: use pthread_sigmask() instead of sigprocmask().
  sigprocmask() is unspecified behavior on multi-thread programs.
  [ruby-core:25217]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 15:44:19 +00:00
naruse c0eb5bb6f2 * signal.c (USE_SIGALTSTACK): NetBSD can't use sigaltstack(2)
with pthread.
  http://netbsd.gw.com/cgi-bin/man-cgi?sigaltstack++NetBSD-current

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-15 08:49:51 +00:00
nobu 423657b42c * signal.c (USE_SIGALTSTACK): only when SA_SIGINFO also is
available.  see [ruby-core:27768].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 03:11:46 +00:00
naruse d5b0c4b1f3 * dln.c, file.c, io.c, signal.c: add __HAIKU__.
patched by Alexander von Gluck [ruby-core:27767]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 03:06:06 +00:00
akr ff9d908832 * include/ruby/ruby.h (rb_bug_errno): declared.
* include/ruby/intern.h (rb_strerrno): declaration removed.

* error.c (rb_strerrno): make it static.  return NULL for unknown
  errors.
  (rb_bug_errno): defined.

* thread_pthread.c: use rb_bug_errno.

* signal.c (ruby_signal): use rb_bug_errno.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 11:03:51 +00:00