1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-04-28 23:20:11 +02:00
parent 994833085a
commit 79671ec57e
135 changed files with 4415 additions and 4885 deletions

View file

@ -33,25 +33,12 @@ describe "Process.euid=" do
as_superuser do
describe "if run by a superuser" do
with_feature :fork do
it "sets the effective user id for the current process if run by a superuser" do
read, write = IO.pipe
pid = Process.fork do
begin
read.close
Process.euid = 1
write << Process.euid
write.close
rescue Exception => e
write << e << e.backtrace
end
Process.exit!
end
write.close
euid = read.gets
euid.should == "1"
Process.wait pid
end
it "sets the effective user id for the current process if run by a superuser" do
code = <<-RUBY
Process.euid = 1
puts Process.euid
RUBY
ruby_exe(code).should == "1\n"
end
end
end