Module: Puppet::Util::AtFork

Defined in:
lib/puppet/util/at_fork.rb

Overview

A module for building AtFork handlers. These handlers are objects providing pre/post fork callbacks modeled after those registered by the ‘pthread_atfork` function. Currently there are two AtFork handler implementations:

  • a noop implementation used on all platforms except Solaris (and possibly even there as a fallback)

  • a Solaris implementation which ensures the forked process runs in a different contract than the parent process. This is necessary for agent runs started by the 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.

Defined Under Namespace

Classes: Noop, Solaris

Class Method Summary collapse

Class Method Details

.get_handlerObject



34
35
36
# File 'lib/puppet/util/at_fork.rb', line 34

def self.get_handler
  @handler_class.new
end