7469
|
1 |
# Solaris specific change; not appropriate for contributing upstream.
|
|
2 |
#
|
|
3 |
# Remove the test_popen_exit test so it won't run; SIGTERM is sent to the
|
|
4 |
# ruby process causing the entire test run to terminate when this test is run.
|
|
5 |
|
|
6 |
--- ruby-2.3.1-orig/test/ruby/test_process.rb 2016-03-29 00:11:32.000000000 -0700
|
|
7 |
+++ ruby-2.3.1/test/ruby/test_process.rb 2016-11-28 15:32:30.591404723 -0800
|
|
8 |
@@ -1729,35 +1729,6 @@ class TestProcess < Test::Unit::TestCase
|
|
9 |
}
|
|
10 |
end
|
|
11 |
|
|
12 |
- def test_popen_exit
|
|
13 |
- bug11510 = '[ruby-core:70671] [Bug #11510]'
|
|
14 |
- pid = nil
|
|
15 |
- opt = {timeout: 10, stdout_filter: ->(s) {pid = s}}
|
|
16 |
- if windows?
|
|
17 |
- opt[:new_pgroup] = true
|
|
18 |
- else
|
|
19 |
- opt[:pgroup] = true
|
|
20 |
- end
|
|
21 |
- assert_ruby_status(["-", RUBY], <<-'end;', bug11510, **opt)
|
|
22 |
- RUBY = ARGV[0]
|
|
23 |
- th = Thread.start {
|
|
24 |
- Thread.current.abort_on_exception = true
|
|
25 |
- IO.popen([RUBY, "-esleep 15", err: [:child, :out]]) {|f|
|
|
26 |
- STDOUT.puts f.pid
|
|
27 |
- STDOUT.flush
|
|
28 |
- sleep(2)
|
|
29 |
- }
|
|
30 |
- }
|
|
31 |
- sleep(0.001) until th.stop?
|
|
32 |
- end;
|
|
33 |
- assert_match(/\A\d+\Z/, pid)
|
|
34 |
- ensure
|
|
35 |
- if pid
|
|
36 |
- pid = pid.to_i
|
|
37 |
- [:TERM, :KILL].each {|sig| Process.kill(sig, pid) rescue break}
|
|
38 |
- end
|
|
39 |
- end
|
|
40 |
-
|
|
41 |
def test_execopts_new_pgroup
|
|
42 |
return unless windows?
|
|
43 |
|