lib/polyphony/adapters/process.rb
def kill_process(pid)
        cancel_after(5) do
          kill_and_await('TERM', pid)
        end
      rescue Polyphony::Cancel
        kill_and_await(-9, pid)
      end
# Watches a forked or spawned process, waiting for it to terminate. If
# `cmd` is given it is spawned, otherwise the process is forked with the
# given block.
# 
# If the operation is interrupted for any reason, the spawned or forked
# process is killed.
#
# @param cmd [String, nil] command to spawn
# @param &block [Proc] block to fork
# @return [void]
Watches a forked or spawned process, waiting for it to terminate. If
`cmd` is given it is spawned, otherwise the process is forked with the
given block.

If the operation is interrupted for any reason, the spawned or forked
process is killed.
Watches a forked or spawned process waiting for it to terminate . If ` cmd ` is given it is spawned otherwise the process is forked with the given block . If the operation is interrupted for any reason the spawned or forked process is killed .
def kill_process(pid)
        cancel_after(5) do
          kill_and_await('TERM', pid)
        end
      rescue Polyphony::Cancel
        kill_and_await(-9, pid)
      end
def kill_process ( pid ) cancel_after ( 5 ) do kill_and_await ( 'TERM' , pid ) end rescue Polyphony :: Cancel kill_and_await ( - 9 , pid ) end
Watches a forked or spawned process, waiting for it to terminate.
Watches a forked or spawned process waiting for it to terminate .
None
void
pid
cmd
command to spawn
command to spawn
&block
block to fork
block to fork