vendor/bundle/ruby/2.5.0/gems/posix-spawn-0.3.13/test/test_child.rb
# verifies that all processes in the given process group are no longer running
# and have been reaped. The current ruby test process is excluded.
# XXX It's weird to use the SUT here but the :pgroup option is useful. Could
# be a IO.popen under Ruby >= 1.9 since it also supports :pgroup.
verifies that all processes in the given process group are no longer running
and have been reaped. The current ruby test process is excluded.
XXX It's weird to use the SUT here but the :pgroup option is useful. Could
be a IO.popen under Ruby >= 1.9 since it also supports :pgroup.
verifies that all processes in the given process group are no longer running and have been reaped . The current ruby test process is excluded . XXX It ' s weird to use the SUT here but the : pgroup option is useful . Could be a IO . popen under Ruby > = 1 . 9 since it also supports : pgroup .
def assert_process_group_reaped(pgid)
    command = "ps axo pgid,pid,args | grep '^#{pgid} ' | grep -v '^#{pgid} #$$'"
    procs = POSIX::Spawn::Child.new(command, :pgroup => true).out
    assert procs.empty?, "Processes in group #{pgid} still running:\n#{procs}"
  end
def assert_process_group_reaped ( pgid ) command = "ps axo pgid,pid,args | grep '^#{pgid} ' | grep -v '^#{pgid} #$$'" procs = POSIX :: Spawn :: Child . new ( command , :pgroup => true ) . out assert procs . empty? , "Processes in group #{pgid} still running:\n#{procs}" end
verifies that all processes in the given process group are no longer running
and have been reaped.
verifies that all processes in the given process group are no longer running and have been reaped .
pgid
<not_specific>