Module: ProcessRunner
- Defined in:
- lib/process_runner.rb,
lib/process_runner/version.rb
Constant Summary collapse
- VERSION =
"0.0.4"
Class Method Summary collapse
-
.go(command, options = {}) ⇒ Integer
Starts an independent process asynchronously with the given
command.
Class Method Details
.go(command, options = {}) ⇒ Integer
Starts an independent process asynchronously with the given command.
> (see IO#popen) for more information on available options.
11 12 13 14 15 |
# File 'lib/process_runner.rb', line 11 def self.go(command, ={}) dirname = File.dirname(command.first) .merge!(:chdir => dirname) if [:chdir].nil? && dirname && !dirname.empty? Process.detach(Process.spawn(*command, )).pid end |