about summary refs log tree commit homepage
path: root/test/test_splitfx.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-12-27 04:39:00 +0000
committerEric Wong <e@80x24.org>2014-12-27 04:39:00 +0000
commit059f0d72aa4663f851187dd98b78a8fda4ce7767 (patch)
tree4d4b37b1bec6ce07656d9533eea58c20915082b4 /test/test_splitfx.rb
parent51c0beacc5e38ff8129c028615ea05cfe275fbce (diff)
downloaddtas-059f0d72aa4663f851187dd98b78a8fda4ce7767.tar.gz
Process.spawn allows vfork() + execve() usage in Ruby 2.2.0 to
improve performance over normal fork() + execve().
Diffstat (limited to 'test/test_splitfx.rb')
-rw-r--r--test/test_splitfx.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_splitfx.rb b/test/test_splitfx.rb
index fd1873e..ab0dcd2 100644
--- a/test/test_splitfx.rb
+++ b/test/test_splitfx.rb
@@ -31,9 +31,9 @@ class TestSplitfx < Testcase
 
         # compare results with expected output
         res_cmd = "sox 1.flac 2.flac -ts32 -c2 -r44100 result.s32"
-        res_pid = fork { exec res_cmd }
+        res_pid = Process.spawn(res_cmd)
         exp_cmd = "sox foo.flac -ts32 -c2 -r44100 expect.s32 trim 4"
-        exp_pid = fork { exec exp_cmd }
+        exp_pid = Process.spawn(exp_cmd)
         _, s = Process.waitpid2(res_pid)
         assert s.success?, "#{res_cmd}: #{s.inspect}"
         _, s = Process.waitpid2(exp_pid)