vendor/bundle/ruby/1.8/gems/daemon_controller-1.0.0/lib/daemon_controller.rb
# On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
# not be able to interrupt Process.waitpid. So here we use a
# special version that's a bit less efficient but is at least
# interruptable.
On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
not be able to interrupt Process.waitpid. So here we use a
special version that's a bit less efficient but is at least
interruptable.
On Ruby 1 . 9 Thread#kill ( which is called by timeout . rb ) may not be able to interrupt Process . waitpid . So here we use a special version that ' s a bit less efficient but is at least interruptable .
def interruptable_waitpid(pid)
			result = nil
			while !result
				result = Process.waitpid(pid, Process::WNOHANG)
				sleep 0.01 if !result
			end
			return result
		end
def interruptable_waitpid ( pid ) result = nil while ! result result = Process . waitpid ( pid , Process :: WNOHANG ) sleep 0.01 if ! result end return result end
On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
not be able to interrupt Process.waitpid.
On Ruby 1 . 9 Thread#kill ( which is called by timeout . rb ) may not be able to interrupt Process . waitpid .
pid