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.



53
54
55
56
57
58
59
60
61
# File 'lib/async/signals.rb', line 53

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