Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

892 Function Prototypes Appendix A


int vsscanf(const char *restrictbuf,const char *restrictformat,
va_listarg);
<stdarg.h> p. 163
<stdio.h>
Returns: number of input items assigned,EOFif input error
or end of file beforeany conversion

void vsyslog(intpriority,const char *format,va_listarg);
<syslog.h> p. 472
<stdarg.h>
Platforms: FreeBSD 8.0, Linux 3.2.0, Mac OS X 10.6.8, Solaris 10

pid_t wait(int *statloc);
<sys/wait.h> p. 238
Returns: process ID if OK, 0, or−1 on error

int waitid(idtype_tidtype,id_tid,siginfo_t *infop,intoptions);
<sys/wait.h> p. 244
idtype:P_PID, P_PGID, P_ALL
options:WCONTINUED, WEXITED, WNOHANG, WNOWAIT,
WSTOPPED
Returns: 0 if OK,−1 on error
Platforms: Linux 3.2.0, Solaris 10

pid_t waitpid(pid_tpid,int *statloc,intoptions);
<sys/wait.h> p. 238
options:WCONTINUED, WNOHANG, WUNTRACED
Returns: process ID if OK, 0, or−1 on error

pid_t wait3(int *statloc,intoptions,struct rusage *rusage);
<sys/types.h> p. 245
<sys/wait.h>
<sys/time.h>
<sys/resource.h>
options:WNOHANG, WUNTRACED
Returns: process ID if OK, 0, or−1 on error
Platforms: FreeBSD 8.0, Linux 3.2.0, Mac OS X 10.6.8, Solaris 10

pid_t wait4(pid_tpid,int *statloc,intoptions,struct rusage *rusage);
<sys/types.h> p. 245
<sys/wait.h>
<sys/time.h>
<sys/resource.h>
options:WNOHANG, WUNTRACED
Returns: process ID if OK, 0, or−1 on error
Platforms: FreeBSD 8.0, Linux 3.2.0, Mac OS X 10.6.8, Solaris 10
Free download pdf