Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

860 Function Prototypes Appendix A


int getrlimit(intresource,struct rlimit *rlptr);
<sys/resource.h> p. 220
resource:RLIMIT_CORE, RLIMIT_CPU,
RLIMIT_DATA, RLIMIT_FSIZE,
RLIMIT_NOFILE, RLIMIT_STACK,
RLIMIT_AS(FreeBSD 8.0, Linux 3.2.0,
Solaris 10),
RLIMIT_MEMLOCK(FreeBSD 8.0, Linux 3.2.0,
Mac OS X 10.6.8),
RLIMIT_MSGQUEUE(Linux 3.2.0),
RLIMIT_NICE(Linux 3.2.0),
RLIMIT_NPROC(FreeBSD 8.0, Linux 3.2.0,
Mac OS X 10.6.8),
RLIMIT_NPTS(FreeBSD 8.0),
RLIMIT_RSS(FreeBSD 8.0, Linux 3.2.0,
Mac OS X 10.6.8),
RLIMIT_SBSIZE(FreeBSD 8.0),
RLIMIT_SIGPENDING(Linux 3.2.0),
RLIMIT_SWAP(FreeBSD 8.0),
RLIMIT_VMEM(Solaris 10)
Returns: 0 if OK,−1 on error

char *gets(char *buf);
<stdio.h> p. 152
Returns:bufif OK,NULLon end of file or error

struct
servent *getservbyname(const char *name,const char *proto);
<netdb.h> p. 599
Returns: pointer if OK,NULLon error

struct
servent *getservbyport(intport,const char *proto);
<netdb.h> p. 599
Returns: pointer if OK,NULLon error

struct
servent *getservent(void);
<netdb.h> p. 599
Returns: pointer if OK,NULLon error

pid_t getsid(pid_tpid);
<unistd.h> p. 296
Returns: session leader’s process group ID if OK,
−1 on error

int getsockname(intsockfd,struct sockaddr *restrictaddr,
socklen_t *restrictalenp);
<sys/socket.h> p. 605
Returns: 0 if OK,−1 on error
Free download pdf