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 » U++ Library support » U++ Core » LocalProcess to read from stderr
LocalProcess to read from stderr [message #37244] Tue, 11 September 2012 12:34 Go to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello all

Now LocalProcess reads output from stdout.

Would it be possible to read also from stderr?


Best regards
Iñaki
Re: LocalProcess to read from stderr [message #37262 is a reply to message #37244] Thu, 13 September 2012 14:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
So far, error and stdout are unified. We would need to alter interfaces a bit to achieve what you need.
Re: LocalProcess to read from stderr [message #37275 is a reply to message #37262] Fri, 14 September 2012 08:54 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

I think in Windows, LocalProcess does not get stdout. I have tried this:

String out = Sys("gcc -c mybadprogram.c");


out is empty. However doing this in the command line:

gcc -c mybadprogram.c 2> errorlog.txt


I get in file errorlog.txt the gcc error message.


Best regards
Iñaki
Re: LocalProcess to read from stderr [message #37286 is a reply to message #37275] Fri, 14 September 2012 15:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 14 September 2012 02:54

Hello Mirek

I think in Windows, LocalProcess does not get stdout. I have tried this:



stderr?

Mirek
Re: LocalProcess to read from stderr [message #37288 is a reply to message #37286] Fri, 14 September 2012 23:34 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Sorry Mirek.

Yes, I meant stderr Rolling Eyes


Best regards
Iñaki
Re: LocalProcess to read from stderr [message #37309 is a reply to message #37275] Tue, 18 September 2012 19:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 14 September 2012 02:54

Hello Mirek

I think in Windows, LocalProcess does not get stdout. I have tried this:

String out = Sys("gcc -c mybadprogram.c");


out is empty. However doing this in the command line:




Took me a while to figure this out... Smile

The problem is that gcc returns non-zero exit code, which makes Sys return void. See documentation...

Mirek
Re: LocalProcess to read from stderr [message #37311 is a reply to message #37309] Tue, 18 September 2012 21:15 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

Thank you. You are right.


Best regards
Iñaki
Previous Topic: SetEnv()
Next Topic: Xmlize has problem with WithDeepCopy<Array<...
Goto Forum:
  


Current Time: Fri Mar 29 01:10:06 CET 2024

Total time taken to generate the page: 0.01528 seconds