www.delorie.com/djgpp/doc/libc/libc_614.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004