Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
authorReid Spencer <rspencer@reidspencer.com>
Thu, 21 Apr 2005 16:12:57 +0000 (16:12 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 21 Apr 2005 16:12:57 +0000 (16:12 +0000)
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

lib/System/Unix/Process.inc
lib/System/Win32/Process.inc

index 1c1373ebb5cdbcb05d5739c2f6adaa09fa2ef801..2f17e712fe74c7efde8517297250347b8ba1ebb9 100644 (file)
@@ -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.
index a47ff2e39bfce4fefb796a8a92684e1a94e34c8f..278ed17d7648527cdfc091fccdb260eebbfc2703 100644 (file)
@@ -91,6 +91,16 @@ Process::GetTimeUsage(
   sys_time.nanoseconds( unsigned(KernelTime % 10000000) * 100 );
 }
 
+int Process::GetCurrentUserId()
+{
+  return 65536;
+}
+
+int Process::GetCurrentGroupId()
+{
+  return 65536;
+}
+
 // Some LLVM programs such as bugpoint produce core files as a normal part of
 // their operation. To prevent the disk from filling up, this configuration item
 // does what's necessary to prevent their generation.