blob: f7cf1a45a814026d71f378612b5b2607bf34abb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
require_relative '../../spec_helper'
describe "Process.waitpid" do
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
|