xt_get_home_dir(3)

NAME
xt_get_home_dir() - Get process owner's home directory

LIBRARY
#include <xtend/proc.h>
-lxtend

SYNOPSIS
char   *xt_get_home_dir(char *dir, size_t maxlen)

ARGUMENTS
dir:    Character buffer to receive home directory path
maxlen: Max characters to copy to dir, not including null byte

DESCRIPTION
xt_get_home_dir() determines the full pathname of the process owner's home directory. The information is retrieved using a call to getpwuid(3), and copied to the argument "dir". The name is stored in dir up to maxlen characters. Note that up to maxlen characters are stored, not including the null terminator, hence the buffer should be at least maxlen+1 bytes long.

RETURN VALUES
A pointer to dir, or NULL upon failure.

SEE ALSO
getuid(3), getpwuid(3)