HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-3.0.2/spec/ruby/core/process/setsid_spec.rb
require_relative '../../spec_helper'

describe "Process.setsid" do
  platform_is_not :windows do
    it "establishes this process as a new session and process group leader" do
      sid = Process.getsid

      out = ruby_exe("p Process.getsid; p Process.setsid; p Process.getsid").lines
      out[0].should == "#{sid}\n"
      out[1].should == out[2]
      out[2].should_not == "#{sid}\n"

      sid.should == Process.getsid
    end
  end
end