Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.215 kB
#include <unistd.h>
#include <pwd.h>
#include <sys/types.h>
#include "getusername.h"
char *
getusername() {
char *user = 0;
struct passwd *pw = getpwuid(getuid());
if (pw)
user = pw->pw_name;
return user;
}
Jump to Line
Something went wrong with that request. Please try again.