1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/process/setsid_spec.rb

17 lines
443 B
Ruby
Raw Normal View History

require_relative '../../spec_helper'
describe "Process.setsid" do
2019-04-28 17:20:11 -04:00
platform_is_not :windows do
it "establishes this process as a new session and process group leader" do
2019-04-28 17:20:11 -04:00
sid = Process.getsid
2019-04-28 17:20:11 -04:00
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