Module: Async::Signals::ForkHook

Included in:
Async::Signals
Defined in:
lib/async/signals.rb

Overview

Resets inherited signal state in forked children.

Instance Method Summary collapse

Instance Method Details

#_forkObject

Fork the current process and reset inherited signal state in the child.



38
39
40
41
42
43
44
45
46
# File 'lib/async/signals.rb', line 38

def _fork
	pid = super
	
	if pid == 0
		Async::Signals.reset!
	end
	
	return pid
end