Sha256: 14e024e150a00a7a6ea587355bb0aac0b9554669dcb8e1013ae6e7e3fe5d98a7
Contents?: true
Size: 480 Bytes
Versions: 52
Compression:
Stored size: 480 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) describe "Process.ppid" do with_feature :fork do it "returns the process id of the parent of this process" do read, write = IO.pipe child_pid = Process.fork { read.close write << "#{Process.ppid}\n" write.close exit! } write.close pid = read.gets read.close Process.wait(child_pid) pid.to_i.should == Process.pid end end end
Version data entries
52 entries across 52 versions & 2 rubygems