Quote Originally Posted by wysota View Post
Each process has its own set of standard output channels. They are not inherited within the process group. Thus, as already said, your intermediate process would need to catch and forward output of the final process.
Thnks by the reply and Ok, so the question is how could catch the std output, this is the code that i use:

I have a class MCompiler : public QProcess

Qt Code:
  1. MCompiler::MCompiler( )
  2. {
  3. mCompiler = tr( "MCompiler" );
  4.  
  5. QProcessEnvironment pEnv = QProcessEnvironment::systemEnvironment();
  6. pEnv.insert( "TMPDIR", SSPATH );
  7. setProcessEnvironment( pEnv );
  8.  
  9. connect( this, SIGNAL( readyReadStandardOutput( ) ), this, SLOT( compileResult( ) ) );
  10. }
To copy to clipboard, switch view to plain text mode 

here is the code when start my compiler

Qt Code:
  1. void MCompiler::compile( QString fileFullPath )
  2. {
  3. argv << fileFullPath;
  4.  
  5. start( mCompiler, argv );
  6. waitForFinished();
  7. }
To copy to clipboard, switch view to plain text mode 
and i have the signal connected to the slot for read the stdOutput

Qt Code:
  1. void SGWMLSCompiler::compileResult()
  2. {
  3. QByteArray bytes = readAllStandardError();
  4. QStringList lines = QString(bytes).split("\n");
  5.  
  6. foreach (QString line, lines) {
  7. qDebug() << line;
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 
And here is where i just get the last std output for Compiler.