Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6ca6030b7f04
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 360f62cfe9f7
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 6, 2017

  1. Copy the full SHA
    7442e5a View commit details
  2. Copy the full SHA
    360f62c View commit details
Showing with 3 additions and 14 deletions.
  1. +2 −9 truffle/src/main/ruby/core/process.rb
  2. +1 −5 truffle/src/main/ruby/core/process_mirror.rb
11 changes: 2 additions & 9 deletions truffle/src/main/ruby/core/process.rb
Original file line number Diff line number Diff line change
@@ -162,14 +162,7 @@ def self.setproctitle_linux_from_proc_maps(title)
raise "Did not find the main class in args" unless main_index
needle = command[0...main_index]
i = haystack.index("\x00#{needle}")
unless i
puts
p needle
puts
p haystack
puts
raise "argv[0] not found"
end
raise "argv[0] not found" unless i
i += 1

@_argv0_max_length = needle.bytesize
@@ -501,7 +494,7 @@ def self.wait2(input_pid=-1, flags=nil)
status, termsig, stopsig, pid = value

status = Process::Status.new(pid, status, termsig, stopsig)
Rubinius::Mirror::Process.set_status_global status
$? = status

[pid, status]
end
6 changes: 1 addition & 5 deletions truffle/src/main/ruby/core/process_mirror.rb
Original file line number Diff line number Diff line change
@@ -87,10 +87,6 @@ module Process
]
SHELL_META_CHAR_PATTERN = Regexp.new("[#{SHELL_META_CHARS.map(&Regexp.method(:escape)).join}]")

def self.set_status_global(status)
$? = status
end

def self.exec(*args)
exe = Execute.new(*args)
exe.spawn_setup(true)
@@ -104,7 +100,7 @@ def self.spawn(*args)
begin
pid = exe.spawn exe.options, exe.command, exe.argv
rescue SystemCallError => error
set_status_global ::Process::Status.new(pid, 127)
$? = ::Process::Status.new(pid, 127)
raise error
end