Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Fluent::DetachProcessManager

Public Class Methods

new() click to toggle source
# File lib/fluent/process.rb, line 34
def initialize
  require 'drb'
  DRb.start_service(create_drb_uri, Broker.new)
  @parent_uri = DRb.uri
end

Public Instance Methods

fork(delegate_object) click to toggle source
# File lib/fluent/process.rb, line 40
def fork(delegate_object)
  ipr, ipw = IO.pipe  # child Engine.emit_stream -> parent Engine.emit_stream
  opr, opw = IO.pipe  # parent target.emit -> child target.emit

  pid = Process.fork
  if pid
    # parent process
    ipw.close
    opr.close
    forward_thread = process_parent(ipr, opw, pid, delegate_object)
    return pid, forward_thread
  end

  # child process
  ipr.close
  opw.close
  forward_thread = process_child(ipw, opr, delegate_object)
  return nil, forward_thread
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.