Unix to Windows Porting Dictionary for HPC

RSS

Links

Function List

popen


Unix

header file: stdio.h

FILE *popen(const char *command, const char *mode);

Windows

header file: stdio.h

FILE *_popen(const char *command, const char *mode);

Purpose

This function creates a pipe and executes a specified command.

Discussion

The Windows and Unix versions of this function differ only in name; when porting, developers should only need to take into account the different name of this Windows version (_popen versus popen).

Windows also provides a wide-character version of this function, _wpopen().

Example of Use in Windows

For a complete example, please see the MSDN article.

blog comments powered by Disqus
Valid HTML 4.01 Transitional Valid CSS!