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>_popen() open a stream (os/2)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _popen()                Open a Stream (OS/2)

 #include   <stdio.h>

 FILE *_popen(command, mode);
 char *command;         Command String
 char *mode;            Mode: "r", "w" ("t" or "b" appended for
                            the appropriate translation mode)

    _popen() creates a pipe and asynchronously executes a child copy
    of the command processor, passing it the command string
    command. It returns a stream connected to one end of the
    created pipe; the other end of the pipe is connected to either the
    child command's standard input or standard output.

    The second argument, mode, specifies the type of access you
    want: "r" specifies that the calling process can read the child
    command's standard output through the returned stream, "w"
    specifies that the calling process can write to the child
    command's standard input through the returned stream. Adding "b"
    (e.g. "wb") opens the stream in binary translation mode; adding
    "t" opens it in text translation mode.

    When you are ready to exit, use _pclose() to close the pipe. For
    more information on pipes, see _pipe().

    Returns:    A stream connected to one end of a pipe if
                successful; NULL otherwise.

    Notes:      This function only works under OS/2.

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


See Also: cwait() _pclose() _pipe()

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