Skip to content

haconiwa/mruby-exec

Repository files navigation

mruby-exec Build Status

Small execv/execve wrapper

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

  # ... (snip) ...

  conf.gem :github => 'haconiwa/mruby-exec'
end

example

Exec.execv("/bin/bash")
#=> The process will become bash

# Also you can pass more than 1 params
Exec.execv("/bin/bash", "-l", "-c", "echo Hello exec")
Exec.execve({"FOO" => "bar"}, "/bin/bash", "-l")

# ... or
# env cleanup
Exec.execve({}, "/bin/bash", "-l")

License

  • under the MIT License: see LICENSE file