module ProcessExecuter
def self.spawn_and_wait(*command, **options_hash)
-
(ProcessExecuter::Result)
- The result of the completed subprocess
Parameters:
-
options_hash
(Hash
) -- The options to use when executing the command -
command
(Array
) -- The command to execute
Other tags:
- See: ProcessExecuter::Options#initialize - ProcessExecuter::Options#initialize for
See: https://ruby-doc.org/core-3.1.2/Kernel.html#method-i-spawn - Kernel.spawn
Other tags:
- Example: capturing stdout to a string -
Example: with a timeout -
def self.spawn_and_wait(*command, **options_hash) options = ProcessExecuter.spawn_and_wait_options(options_hash) spawn_and_wait_with_options(command, options) end