Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » capturing stdout/err/in of subprocess
Re: capturing stdout/err/in of subprocess [message #1703 is a reply to message #1702] Tue, 14 March 2006 11:16 Go to previous messageGo to previous message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
luzr wrote on Tue, 14 March 2006 22:54

I guess you still do not understand my worries Smile

The problem is not with feeding characters down the subprocess stdin - that is simple. And subprocess will wait if stdin is empty.

The problem is with user interface implementation - it is terminal responsibility to echo user input. Try to start a long process in cmd.exe (or linux terminal) and try to hit some character keys while process is running - the characters will not appear until subprocess blocks waiting for input (e.g. getchar). (Of course, it can appear after it ends too).

The problem is that there is no method known to me how to detect this "child process is blocked as it is waiting for user input - time to display user input line".

Mirek


You're right, I don't understand Smile (though I was trying to respond to Wilho). But however, I'm curious. I've only used Linux terminal a little but like many people, I use cmd.exe a lot and I'm struggling to see where cmd.exe performs the echoing of user input you refer to e.g. if I do CL /?, the "CL" application is fed keys and does its own echoing (if any) - cmd.exe doesn't do the echoing. I would have thought any echoing is done by the application itself, via stdout. Any way, not to worry. I don't know how to build an atomic bomb either ...

Graeme
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New EH handling in MinGW
Next Topic: DLL and U++ type
Goto Forum:
  


Current Time: Sat May 04 20:08:18 CEST 2024

Total time taken to generate the page: 0.02644 seconds