ipc - In **portable C**, how to launch a command connecting the command's stdin to the launcher's stdout? -
in c program (p1), how launch dynamically constructed command (and arguments) reads standard input p1's standard output?
note that:
a method other stdout --> stdin piping ok provided portable across windows , linux.
i cannot use c++, java, perl, ruby, python, etc here.
also, have mingw dependency windows build?
reopened: question below answers linux, question wants portable method. execute program within c program
the microsoft c runtime calls _popen
instead of popen
, appears have same functionality in windows (for console applications) , linux.
Comments
Post a Comment