Cross-platform way to start a process and redirect it to stdio

I would like to know if there is a cross-platform (Windows, Linux, BSD) library with which I could start the process asynchronously and have iostream wrappers for my standard channels.

I would like him to be able to tell when the process was completed.

Thanks.

+4
source share
1 answer

There are 2 libraries you can use:

Qprocess

You can use the QProcess class from the Qt toolkit. More information can be found at fooobar.com/questions/243705 / ... and the qt library .

libexecstream

This library is lighter Qt and cross-platform

Other

  • pstreams release 0.17

    If you want only a console application, you can use the old branch with the extension (version 0.17), which uses the Win32 _popen () and _pclose () functions, but they will not work in the GUI program (and may explode if Windows does not do this for you .) This version does not have most of the library functions and is no longer supported or not tested.

+2
source

All Articles