summaryrefslogtreecommitdiff
path: root/src/unistd/getlogin.c
blob: bd110395aaf0ba07a47832a8b02cc9d7d43aa826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
#include "stdlib.h"

char * getlogin(void)
{
	/* TODO: get actual controlling terminal, then read utmpx */
	
	return getenv("LOGNAME");
}

/*
POSIX(1)
*/