
#include <stdio.h> int pclose(FILE *pipe);
pclose closes a pipe connected to a shell command
that was opened by popen. The argument pipe is the
FILE pointer returned by popen. The pclose function
waits for the associated process to terminate.
An appropriate feature test macro (_SASC_POSIX_SOURCE or
_POSIX_C_SOURCE) must be defined to make the declaration of
pclose in <stdio.h> visible.
pclose returns the exit status of the command. pclose returns
- 1 if the stream is not associated with a command called by popen,
or if an error occurs closing the pipe.
pclose is defined in accordance with POSIX 1003.2.
popen.
fclose, popen
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.