summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process/waitpid_spec.rb
blob: fdd6be12877350cd486595cbb182d2740df346f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../../spec_helper'

describe "Process.waitpid" do
  it "needs to be reviewed for spec completeness"

  it "returns nil when the process has not yet completed and WNOHANG is specified" do
    pid = spawn("sleep 5")
    begin
      Process.waitpid(pid, Process::WNOHANG).should == nil
      Process.kill("KILL", pid)
    ensure
      Process.wait(pid)
    end
  end
end