Sha256: 42ac8d1df9aa2f70e390f575b86ff13d1f230edec6e081294fd7dee7e9b4741e

Contents?: true

Size: 419 Bytes

Versions: 29

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

# Overrides for Process
module ::Process
  class << self
    alias_method :orig_detach, :detach
    def detach(pid)
      fiber = spin { Polyphony.backend_waitpid(pid) }
      fiber.define_singleton_method(:pid) { pid }
      fiber
    end

    alias_method :orig_daemon, :daemon
    def daemon(*args)
      orig_daemon(*args)
      Polyphony.original_pid = Process.pid
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
polyphony-0.99 lib/polyphony/extensions/process.rb
polyphony-0.98 lib/polyphony/extensions/process.rb
polyphony-0.97 lib/polyphony/extensions/process.rb
polyphony-0.96 lib/polyphony/extensions/process.rb
polyphony-0.95 lib/polyphony/extensions/process.rb
polyphony-0.94 lib/polyphony/extensions/process.rb
polyphony-0.93 lib/polyphony/extensions/process.rb
polyphony-0.92 lib/polyphony/extensions/process.rb
polyphony-0.91 lib/polyphony/extensions/process.rb
polyphony-0.90 lib/polyphony/extensions/process.rb
polyphony-0.89 lib/polyphony/extensions/process.rb
polyphony-0.87 lib/polyphony/extensions/process.rb
polyphony-0.86 lib/polyphony/extensions/process.rb
polyphony-0.85 lib/polyphony/extensions/process.rb
polyphony-0.84.1 lib/polyphony/extensions/process.rb
polyphony-0.84 lib/polyphony/extensions/process.rb
polyphony-0.83 lib/polyphony/extensions/process.rb
polyphony-0.82 lib/polyphony/extensions/process.rb
polyphony-0.81.1 lib/polyphony/extensions/process.rb
polyphony-0.81 lib/polyphony/extensions/process.rb