forget difference between big and small commands - obsolete with vm.
[minix.git] / commands / simple / whoami.c
blob99ec440cb1b39c89de27f1a287fc6f382684ba29
1 /* whoami - print the current user name Author: Terrence W. Holm */
3 #include <sys/types.h>
4 #include <pwd.h>
5 #include <stdlib.h>
6 #include <unistd.h>
7 #include <stdio.h>
9 _PROTOTYPE(int main, (void));
11 int main()
13 struct passwd *pw_entry;
15 pw_entry = getpwuid(geteuid());
16 if (pw_entry == NULL) exit(1);
17 puts(pw_entry->pw_name);
18 return(0);