mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	message to stderr instead of using rb_bug(). * KNOWNBUGS.rb, bootstraptest/test_fork.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			550 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			550 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
assert_equal '0', %q{
 | 
						|
  begin
 | 
						|
    GC.stress = true
 | 
						|
    pid = fork {}
 | 
						|
    Process.wait pid
 | 
						|
    $?.to_i
 | 
						|
  rescue NotImplementedError
 | 
						|
    0
 | 
						|
  end
 | 
						|
}, '[ruby-dev:32404]'
 | 
						|
 | 
						|
assert_finish 10, %q{
 | 
						|
  begin
 | 
						|
    children = (1..10).map{
 | 
						|
      Thread.start{fork{}}.value
 | 
						|
    }
 | 
						|
    while !children.empty? and pid = Process.wait
 | 
						|
      children.delete(pid)
 | 
						|
    end
 | 
						|
  rescue NotImplementedError
 | 
						|
  end
 | 
						|
}, '[ruby-core:22158]'
 | 
						|
 | 
						|
assert_normal_exit(<<'End', '[ruby-dev:37934]')
 | 
						|
  Thread.new { sleep 1; Thread.kill Thread.main }
 | 
						|
  Process.setrlimit(:NPROC, 1)
 | 
						|
  fork {}
 | 
						|
End
 |