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

Version Path
rhodes-2.0.0.beta11 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta10 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta9 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta8 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta7 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta6 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta4 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta3 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.5 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta2 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-2.0.0.beta1 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.4 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.3 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.2 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.1 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.5.0 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.4.2 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.4.1 spec/framework_spec/app/spec/core/process/ppid_spec.rb
rhodes-1.4.0 spec/framework_spec/app/spec/core/process/ppid_spec.rb