popen() STDIO Function popen() Open a pipe #include <stdio.h> FILE *popen(command, how) char *command, *how; popen opens a pipe. It resembles the function fopen, except that the opened object is a command line to the shell sh rather than a file. The caller can read the standard output of command when how is r, or write to the standard input of command when how is w. popen returns a pointer to a FILE structure that may be read or writ- ten. ***** Files ***** <stdio.h> ***** See Also ***** fclose(), fopen(), pclose(), pipe(), sh, STDIO, system(), wait() ***** Diagnostics ***** popen returns NULL if the link to command could not be es- tablished. COHERENT Lexicon Page 1