I'm trying to launch cmd.exe using Poco::launch(...)
I'm passing Pipe objects so that the STDIN, STDOUT and STDERR of the cmd.exe can be written and read from.
- Code: Select all
Poco::Process::launch("cmd.exe", args, &m_inPipe, &m_outPipe, &m_outPipe);
Is this a correct approach to redirect the stdin/out/err of cmd.exe?
Is this at all possible with Poco?
I do get to see the console window but without any text being printed (as expected)
This is followed by a write of a "dir\r\n" to the m_inPipe.
- Code: Select all
m_inPipe.writeBytes("dir\r\n", 5);
The program blocks on attempt to read from m_outPipe.
I'd like to write commands to the m_inPipe and read output from m_outPipe just as a user would type commands in an interactive session.
Regards,
Milind





