pclose() STDIO Function pclose() Close a pipe #include <stdio.h> int pclose(fp) FILE *fp; pclose closes the pipe pointed to by fp, which must have been opened by the function popen. pclose awaits the completion of the child process and performs other cleanup. It returns the value from a WAIT done on the child process. This value includes information in addition to the ``simple'' exit value of the child process. ***** Files ***** <stdio.h> ***** See Also ***** fclose(), fopen(), pipe(), popen(), sh, STDIO, system(), wait() ***** Diagnostics ***** pclose returns -1 if fp had not been created by a call to popen. Otherwise, pclose returns the exit status of the command, in the format described in the entry for wait: exit status in the high byte, signal information in the low byte. COHERENT Lexicon Page 1