<commit_before># mruby-signal

Signal trap and callback in mruby

## Synopsis

```ruby
Signal.trap(:INT) {
  p "hello signal"
}
```

## Methods

Signal.trap(sig, command){ block }
Signal.list
Signal.signame(signm)

## Installation

### use github repository

Write in /mruby/build_config.rb

```ruby
MRuby::Build.new do |conf|
  conf.gem :github => 'ksss/mruby-signal', :branch => 'master'
end
```

## License

MIT
<commit_msg>readme more readalbe<commit_after># mruby-signal

Signal trap and callback in mruby

## Synopsis

```ruby
Signal.trap(:INT) {
  p "hello signal"
}
p Signal.list #=> {"EXIT"=>0, "HUP"=>1, "INT"=>2, "QUIT"=>3, "ILL"=>4, "TRAP"=>5, "ABRT"=>6, "IOT"=>6, "EMT"=>7, "FPE"=>8, "KILL"=>9, "BUS"=>10, "SEGV"=>11, "SYS"=>12, "PIPE"=>13, "ALRM"=>14, "TERM"=>15, "URG"=>16, "STOP"=>17, "TSTP"=>18, "CONT"=>19, "CHLD"=>20, "CLD"=>20, "TTIN"=>21, "TTOU"=>22, "IO"=>23, "XCPU"=>24, "XFSZ"=>25, "VTALRM"=>26, "PROF"=>27, "WINCH"=>28, "USR1"=>30, "USR2"=>31, "INFO"=>29}
```

## Methods

* Signal.trap(sig, command){ block }
* Signal.list
* Signal.signame(signm)

## Installation

### use github repository

Write in /mruby/build_config.rb

```ruby
MRuby::Build.new do |conf|
  conf.gem :github => 'ksss/mruby-signal', :branch => 'master'
end
```

## License

MIT

{'fraction_non_alphanumeric': 0.24646781789638933, 'fraction_numerical': 0.04631083202511774, 'mean_word_length': 5.375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7331966', 'n_tokens_mistral': 617, 'n_tokens_neox': 562, 'n_words': 116}