aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/process/waitpid_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/process/waitpid_spec.rb')
-rw-r--r--spec/ruby/core/process/waitpid_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/core/process/waitpid_spec.rb b/spec/ruby/core/process/waitpid_spec.rb
new file mode 100644
index 0000000000..c95e8d59dd
--- /dev/null
+++ b/spec/ruby/core/process/waitpid_spec.rb
@@ -0,0 +1,15 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+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