ptg10805159
Appendix A Function Prototypes 867
int pclose(FILE *fp);
<stdio.h> p. 541
Returns: termination status ofpopencmdstring,−1 on error
void perror(const char *msg);
<stdio.h> p. 15
int pipe(intfd[2]);
<unistd.h> p. 535
Returns: 0 if OK,−1 on error
int poll(struct pollfdfdarray[], nfds_tnfds,inttimeout);
<poll.h> p. 506
Returns: count of ready descriptors, 0 on timeout,−1 on error
FILE *popen(const char *cmdstring,const char *type);
<stdio.h> p. 541
type:"r", "w"
Returns: file pointer if OK,NULLon error
int posix_openpt(intoflag);
<stdlib.h> p. 722
<fcntl.h>
oflag:O_RWDR, O_NOCTTY
Returns: file descriptor of next available PTY master if OK,
−1 on error
ssize_t pread(intfd,void *buf,size_tnbytes,off_toffset);
<unistd.h> p. 78
Returns: number of bytes read, 0 if end of file,−1 on error
int printf(const char *restrictformat,...);
<stdio.h> p. 159
Returns: number of characters output if OK, negative value
if output error
int pselect(intmaxfdp1,fd_set *restrictreadfds,
fd_set *restrictwritefds,fd_set *restrictexceptfds,
const struct timespec *restricttsptr,
const sigset_t *restrictsigmask);
<sys/select.h> p. 506
Returns: count of ready descriptors, 0 on timeout,−1 on error
void psiginfo(const siginfo_t *info,const char *msg);
<signal.h> p. 379