Go to the first, previous, next, last section, table of contents.


pclose

Syntax

#include <stdio.h>

int pclose(FILE *pipe);

Description

This function closes a pipe opened with popen (see section popen). Note that since MS-DOS is not multitasking, this function will actually run the program specified in popen if the pipe was opened for writing.

Return Value

Zero on success, nonzero on failure.

Portability

not ANSI, POSIX

Example

FILE *f = popen("sort", "w");
write_to_pipe(f);
pclose(f);


Go to the first, previous, next, last section, table of contents.