Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_pclose() close a stream (os/2)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _pclose()               Close a Stream (OS/2)

 #include   <stdio.h>

 int _pclose(stream);
 FILE *stream;          Return value from previous _popen call

    _pclose() waits for the child process started by a previous
    _popen() function call to terminate; then it closes the child
    process' stream (standard input or output as defined in the
    previous _popen() call).

    If the child process exits by calling DosExit(), the low-
    order byte of the return word holds the result code passed by the
    child process to DosExit().

    On the other hand, if the child process exits without calling
    DosExit, the high-order byte of the termination word holds a
    termination code from DosWait() like this:

                    1  =  Hard-error abort
                    2  =  Trap operation
                    3  =  SIGTERM signal not intercepted

    Returns:    Exit status of child process if successful; -1
                otherwise.

    Notes:      This function only works under OS/2.

 Portability:   OS/2 only. Not supported by the ANSI standard.


See Also: cwait() _popen()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson