Small execv/execve
wrapper
- add conf.gem line to
build_config.rb
MRuby::Build.new do |conf|
# ... (snip) ...
conf.gem :github => 'haconiwa/mruby-exec'
end
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")
- under the MIT License: see LICENSE file