Sha256: 91a9ca7cee2afeee86c19ba70d79c318480a161e5f48d589216e265ead949320
Contents?: true
Size: 449 Bytes
Versions: 19
Compression:
Stored size: 449 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "Process.ppid" 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
Version data entries
19 entries across 19 versions & 1 rubygems