Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Process::GID.switch

Process::GID.switch → integer
Process::GID.switch {|| block} → object

Switch the effective and real group IDs of the current process. If a block is given, the group IDs will be switched back after the block is executed. Returns the new effective group ID if called without a block, and the return value of the block if one is given.

See also .sid_available? .rid also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0