#include <wchar.h>
|
FILE *
wpopen (const wchar_t* command, const wchar_t* type ); |
The command argument is a pointer to a null-terminated wide character string containing a shell command line. This command is passed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell.
The return value from wpopen is a normal standard I/O stream in all respects save that it must be closed with pclose rather than fclose. Writing to such a stream writes to the standard input of the command; the commands standard output is the same as that of the process that called wpopen, unless this is altered by the command itself. Conversely, reading from a "wpopened" stream reads the commands standard output, and the commands standard input is the same as that of the process that called wpopen.
Note that output wpopen streams are fully buffered by default.
Failure to execute the shell is indistinguishable from the shells failure to execute command, or an immediate exit of the command. The only hint is an exit status of 127.
The wpopen function always calls sh, never calls csh.
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |