HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleunix-2.8.7.0Haskell2010

System.Posix.User

POSIX user/group support

  • 29 values
  • Packageunix-2.8.7.0
  • Exports31
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUser.hsc

User environment

0 declarations

Querying the user environment

valuegetRealUserID :: IO UserID
#

getRealUserID calls getuid to obtain the real UserID associated with the current process.

getRealGroupID calls getgid to obtain the real GroupID associated with the current process.

getEffectiveUserID calls geteuid to obtain the effective UserID associated with the current process.

getEffectiveGroupID calls getegid to obtain the effective GroupID associated with the current process.

valuegetGroups :: IO [GroupID]
#

getGroups calls getgroups to obtain the list of supplementary GroupIDs associated with the current process.

valuegetLoginName :: IO String
#

getLoginName calls getlogin to obtain the login name associated with the current process.

The group database

The user database

Modifying the user environment

valuesetUserID :: UserID -> IO ()
#

setUserID uid calls setuid to set the real, effective, and saved set-user-id associated with the current process to uid.

valuesetGroupID :: GroupID -> IO ()
#

setGroupID gid calls setgid to set the real, effective, and saved set-group-id associated with the current process to gid.

valuesetEffectiveUserID :: UserID -> IO ()
#

setEffectiveUserID uid calls seteuid to set the effective user-id associated with the current process to uid. This does not update the real user-id or set-user-id.

valuesetEffectiveGroupID :: GroupID -> IO ()
#

setEffectiveGroupID uid calls setegid to set the effective group-id associated with the current process to gid. This does not update the real group-id or set-group-id.

valuesetGroups :: [GroupID] -> IO ()
#

setGroups calls setgroups to set the list of supplementary GroupIDs associated with the current process.