summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-21 16:12:04 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-21 16:12:04 +0000
commit78202b4c5080bd639ee644048580a22f0bda43fe (patch)
treefd34b5c5ff0b6d05d94b14e297e6cca3d089fd7d /include
parentf68563ff8ab7f0bf9b482ae21df561f0151ca1c4 (diff)
downloadllvm-78202b4c5080bd639ee644048580a22f0bda43fe.tar.gz
llvm-78202b4c5080bd639ee644048580a22f0bda43fe.tar.bz2
llvm-78202b4c5080bd639ee644048580a22f0bda43fe.tar.xz
Add two new methods for getting the User Id and Group Id values for the
current process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/System/Process.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/System/Process.h b/include/llvm/System/Process.h
index 80fadbad6c..4182e74c60 100644
--- a/include/llvm/System/Process.h
+++ b/include/llvm/System/Process.h
@@ -63,6 +63,16 @@ namespace sys {
///< Returns the current amount of system time for the process
);
+ /// This static function will return the process' current user id number.
+ /// Not all operating systems support this feature. Where it is not
+ /// supported, the function should return 65536 as the value.
+ static int GetCurrentUserId();
+
+ /// This static function will return the process' current group id number.
+ /// Not all operating systems support this feature. Where it is not
+ /// supported, the function should return 65536 as the value.
+ static int GetCurrentGroupId();
+
/// This function makes the necessary calls to the operating system to
/// prevent core files or any other kind of large memory dumps that can
/// occur when a program fails.