summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_process.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 3921395466a..8ad53ac78e3 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -181,7 +181,11 @@ class TestProcess < Test::Unit::TestCase
io.close
assert_raise(ArgumentError) { system(*TRUECOMMAND, :pgroup=>-1) }
- assert_raise(Errno::EPERM) { Process.wait spawn(*TRUECOMMAND, :pgroup=>2) }
+ IO.popen([RUBY, '-egets'], 'w') do |f|
+ assert_raise(Errno::EPERM) {
+ Process.wait spawn(*TRUECOMMAND, :pgroup=>f.pid)
+ }
+ end
io1 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>true])
io2 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>io1.pid])