Sha256: 0c61b1acc2f38583b64c016d92d1aa4a4478ad5a57555eb07b851693211ff2cc

Contents?: true

Size: 395 Bytes

Versions: 14

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

module ScriptCore
  class Spawner
    def spawn(*)
      super
    end

    def wait(pid, flags = 0)
      _pid, status = Process.wait2(pid, flags)

      return unless status

      if status.signaled?
        255 + status.termsig
      else
        status.exitstatus
      end
    end

    def kill(signal, pid)
      Process.kill(signal, pid)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
script_core-0.3.2 lib/script_core/spawner.rb
script_core-0.3.0 lib/script_core/spawner.rb
script_core-0.2.7 lib/script_core/spawner.rb
script_core-0.2.6 lib/script_core/spawner.rb
script_core-0.2.5 lib/script_core/spawner.rb
script_core-0.2.4 lib/script_core/spawner.rb
script_core-0.2.3 lib/script_core/spawner.rb
script_core-0.2.2 lib/script_core/spawner.rb
script_core-0.2.1 lib/script_core/spawner.rb
script_core-0.2.0 lib/script_core/spawner.rb
script_core-0.1.1 lib/script_core/spawner.rb
script_core-0.1.0 lib/script_core/spawner.rb
script_core-0.0.6 lib/script_core/spawner.rb
script_core-0.0.5 lib/script_core/spawner.rb