Skip to content

ksss/mruby-signal

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Signal class implementation for mruby

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published