diff options
Diffstat (limited to 'code/snippets/process_spawn.rb')
| -rw-r--r-- | code/snippets/process_spawn.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/code/snippets/process_spawn.rb b/code/snippets/process_spawn.rb new file mode 100644 index 0000000..04f6b0f --- /dev/null +++ b/code/snippets/process_spawn.rb @@ -0,0 +1,7 @@ +# This call will start up the 'rails server' process with the +# RAILS_ENV environment variable set to 'test'. +Process.spawn({'RAILS_ENV' => 'test'}, 'rails server') + +# This call will merge STDERR with STDOUT for the duration +# of the 'ls --help' program. +Process.spawn('ls', '--zz', STDERR => STDOUT) |
