Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

Appendix A Function Prototypes 857


char *getenv(const char *name);
<stdlib.h> p. 210
Returns: pointer to value associated withname,
NULLif not found

uid_t geteuid(void);
<unistd.h> p. 228
Returns: effective user ID of calling process

gid_t getgid(void);
<unistd.h> p. 228
Returns: real group ID of calling process

struct
group *getgrent(void);
<grp.h> p. 183
Returns: pointer if OK,NULLon error or end of file

struct
group *getgrgid(gid_tgid);
<grp.h> p. 182
Returns: pointer if OK,NULLon error

struct
group *getgrnam(const char *name);
<grp.h> p. 182
Returns: pointer if OK,NULLon error

int getgroups(intgidsetsize,gid_tgrouplist[]);
<unistd.h> p. 184
Returns: number of supplementary group IDs if OK,
−1 on error

struct
hostent *gethostent(void);
<netdb.h> p. 597
Returns: pointer if OK,NULLon error

int gethostname(char *name,intnamelen);
<unistd.h> p. 188
Returns: 0 if OK,−1 on error

char *getlogin(void);
<unistd.h> p. 275
Returns: pointer to string giving login name if OK,
NULLon error
Free download pdf