diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-04-21 16:12:57 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-04-21 16:12:57 +0000 |
commit | 93b34734781ce96b3abdd58be3333dbfe593d911 (patch) | |
tree | 6609a9aef2fd36436a8bc0eca922221e6d3827a6 /lib/System/Unix | |
parent | 78202b4c5080bd639ee644048580a22f0bda43fe (diff) |
Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
methods that were recently added to the interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/Process.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/System/Unix/Process.inc b/lib/System/Unix/Process.inc index 1c1373ebb5..2f17e712fe 100644 --- a/lib/System/Unix/Process.inc +++ b/lib/System/Unix/Process.inc @@ -109,6 +109,16 @@ Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time, #endif } +int Process::GetCurrentUserId() +{ + return getuid(); +} + +int Process::GetCurrentGroupId() +{ + return getgid(); +} + // Some LLVM programs such as bugpoint produce core files as a normal part of // their operation. To prevent the disk from filling up, this function // does what's necessary to prevent their generation. |