Skip to content
C Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker
mrblib
src
test
.travis-spec-build_config.rb
.travis-test-build_config.rb
.travis.yml
LICENSE.txt
README.md
mrbgem.rake

README.md

mruby-signal

Build Status

Signal trap and callback in mruby.

Synopsis

Signal.trap(:INT) { |signo|
  p "hello signal #{Signal.signame(signo)}" #=> "hello signal INT"
}

Methods

  • Signal.trap(sig, command){|signo| block }
  • Signal.list
  • Signal.signame(signo)
  • Kernel.trap(sig, command){|signo| block }

Installation

Write in /mruby/build_config.rb

MRuby::Build.new do |conf|
  # from mgem
  conf.gem :mgem => 'mruby-signal'

  # or from github
  conf.gem :github => 'ksss/mruby-signal', :branch => 'master'
end

License

MIT

Based on

https://github.com/ruby/ruby/blob/trunk/signal.c

Passed the ruby/spec

mruby-signal passed the below specs in ruby/spec

See also

http://ruby-doc.org/core-2.3.1/Signal.html

You can’t perform that action at this time.