Skip to content

Instantly share code, notes, and snippets.

@bmc
Created January 1, 2011 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmc/761820 to your computer and use it in GitHub Desktop.
Save bmc/761820 to your computer and use it in GitHub Desktop.
Testing asuser.rb gist
puts("Caller PID = #{Process.pid}")
puts("Caller UID = #{Process.uid}")
as_user "bmc" do |user|
puts("In child process. User=#{user}, PID=#{Process.pid}, UID=#{Process.uid}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment