mirror of
https://github.com/ruby/ruby.git
synced 2026-08-01 02:20:48 +08:00
Revert "merge revision(s) 190b017fc6c21ff7b61c2b5ece0294785e4a4ca2: [Backport #21703]"
This reverts commit 83637aea6ea726f7fc4c17e56ac60c289e2d98db.
This commit is contained in:
parent
3cd6323fbb
commit
fecabc3145
7
io.c
7
io.c
@ -8051,12 +8051,7 @@ ruby_popen_writer(char *const *argv, rb_pid_t *pid)
|
||||
int write_pair[2];
|
||||
# endif
|
||||
|
||||
#ifdef HAVE_PIPE2
|
||||
int result = pipe2(write_pair, O_CLOEXEC);
|
||||
#else
|
||||
int result = pipe(write_pair);
|
||||
#endif
|
||||
|
||||
int result = rb_cloexec_pipe(write_pair);
|
||||
*pid = -1;
|
||||
if (result == 0) {
|
||||
# ifdef HAVE_WORKING_FORK
|
||||
|
||||
@ -956,27 +956,6 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_crash_report_pipe_script
|
||||
omit "only runs on Linux" unless RUBY_PLATFORM.include?("linux")
|
||||
|
||||
Tempfile.create(["script", ".sh"]) do |script|
|
||||
Tempfile.create("crash_report") do |crash_report|
|
||||
script.write(<<~BASH)
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat > #{crash_report.path}
|
||||
BASH
|
||||
script.close
|
||||
|
||||
FileUtils.chmod("+x", script)
|
||||
|
||||
assert_crash_report("| #{script.path}") do
|
||||
assert_include(File.read(crash_report.path), "[BUG] Segmentation fault at")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_DATA
|
||||
Tempfile.create(["test_ruby_test_rubyoption", ".rb"]) {|t|
|
||||
t.puts "puts DATA.read.inspect"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user