I need to write c++ code that uses the ACE library to create a process by building a string of its command line and redirect its output to a text file. I tried to use ACE_Process and ACE_Process_option classes. I set ACE_Process_option.command_line by using the following format, with the redirect operator: " > ". Unfortunately, it didn't work: the string that I build (the value of ACE_Process_option.command_line field) activates the process and redirect it to a text file when I write it in the cmd (the command line console), but it doesn't work when I try to use it from the code. Any ideas how to do it?
How to redirect process output by using C++ ACE library
346 Views Asked by user3179744 At
1
There are 1 best solutions below
Related Questions in ACE
- Unable to compile ACE 6.4.0 on RedHat 7.2
- Integrate asio::io_service into ACE_Reactor based app
- Building ACE_SSL
- Error while linking with statically compiled OpenDDS / ACE
- CLANG vs. GNU Compilers Collection - Compiles in GNU but fails in CLANG
- ACE fails at Linker in MAC OS X 10.9 (and higher)
- Destroy of corba servants actived by _this
- Why is IDL incomplete?
- Named pipe client (ACE, ACE_SPIPE_Connector) could not connect to csharp (NamedPipeServerStream) server
- ACE SSL Error: peer did not return a certificate
- How to build ACE 6.0(network library) as static?
- TCP server with state information using network library
- ACE debugging: How to cause msg queue full?
- how to end a reactor event loop in ace
- Unable to acquire a mutex held by a ACE_Condition wait
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Check chapter 10 of the ACE Programmers Guide. The example code of this section is available as part of the ACE distribution under
examples/APG/Processes, see theManager::setStdHandlesoperation as part of theSpawn.cppexample