[Previous]
[Contents]
[Next]

pclose()

close a pipe

Synopsis:

#include <stdio.h>
int pclose( FILE *stream );

Description:

The pclose() function closes the pipe associated with stream, and waits for the subprocess created by popen() to terminate.

Returns:

The termination status of the command language interpreter. On error, pclose() returns -1, with errno set appropriately.

Errors:

EINTR
The pclose() function was interrupted by a signal while waiting for the child process to terminate.
ECHILD
The pclose() function was unable to obtain the termination status of the child process.

Examples:

See popen().

Classification:

UNIX

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

errno, popen(), pipe()


[Previous]
[Contents]
[Next]