Class: Puppet::Util::AtFork::Solaris

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/at_fork/solaris.rb

Overview

Solaris implementation of the Puppet::Util::AtFork handler. The callbacks defined in this implementation ensure the forked process runs in a different contract than the parent process. This is necessary in order for the child process to be able to survive termination of the contract its parent process runs in. This is needed notably for an agent run executed by a puppet agent service to be able to restart that service without being killed in the process as a consequence of running in the same contract as the service, as all processes in the contract are killed when the contract is terminated during the service restart.

Instance Method Summary collapse

Instance Method Details

#childObject



155
156
157
# File 'lib/puppet/util/at_fork/solaris.rb', line 155

def child
  deactivate_contract_template(false)
end

#parentObject



150
151
152
153
# File 'lib/puppet/util/at_fork/solaris.rb', line 150

def parent
  deactivate_contract_template(true)
  abandon_latest_child_contract
end

#prepareObject



146
147
148
# File 'lib/puppet/util/at_fork/solaris.rb', line 146

def prepare
  activate_new_contract_template
end