_pclose

Waits for new command processor and closes stream on associated pipe.

int_pclose(FILE\stream);*

Routine Required Header Compatibility
_pclose <stdio.h> Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

_pclose returns the exit status of the terminating command processor, or –1 if an error occurs. The format of the return value is the same as that for _cwait, except the low-order and high-order bytes are swapped.

Parameter

stream

Return value from previous call to _popen

Remarks

The _pclose function looks up the process ID of the command processor (CMD.EXE) started by the associated _popen call, executes a _cwait call on the new command processor, and closes the stream on the associated pipe.

Process and Environment Control Routines

See Also _pipe, _popen