summaryrefslogtreecommitdiff
path: root/Userland/id.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-22 14:06:22 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-22 14:06:22 +0200
commit63764b3a652e7bbde9e11e7a6b1b3dab65bb54ee (patch)
treed541fc804219fb2db5e5c61ceec023b773273ef8 /Userland/id.cpp
parent4cbf079a1726c55599d0735bc9f81d5a50cd7446 (diff)
downloadserenity-63764b3a652e7bbde9e11e7a6b1b3dab65bb54ee.zip
Import very modest Userland.
Diffstat (limited to 'Userland/id.cpp')
-rw-r--r--Userland/id.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/id.cpp b/Userland/id.cpp
new file mode 100644
index 0000000000..fd76e81427
--- /dev/null
+++ b/Userland/id.cpp
@@ -0,0 +1,12 @@
+#include <LibC/unistd.h>
+#include <LibC/stdio.h>
+
+int main(int c, char** v)
+{
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+ pid_t pid = getpid();
+ printf("uid=%u, gid=%u, pid=%u\n", uid, gid, pid);
+ return 0;
+}
+