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 » StdLogSetup breaks ReadStdIn
StdLogSetup breaks ReadStdIn [message #40678] Sun, 01 September 2013 17:30 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi everyone,

I came to weird and unexpected side effect of call to StdLogSetup(). Consider this code:
CONSOLE_APP_MAIN{
	StdLogSetup(LOG_FILE);
	String ln = ReadStdIn();
	DUMP(ln);
}

If you comment out the StdLogSetup call, it works as expected. But with the setup (which in this case should effectively do nothing, logging to file is default) the app exits right away, without waiting for input from standard input and the DUMP prints empty string.

It seems to me as if the StdLogSetup sets input to be non-blocking. Am I doing something wrong? Or is there some other way to make it work again?

Best regards,
Honza
Re: StdLogSetup breaks ReadStdIn [message #40680 is a reply to message #40678] Sun, 01 September 2013 19:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Fixed.

Mirek
Re: StdLogSetup breaks ReadStdIn [message #40682 is a reply to message #40680] Sun, 01 September 2013 19:19 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Well, that was fast Smile Thank you Mirek.

Honza
Previous Topic: Equivalent in U++ to STL list container
Next Topic: Core/SSL change to let MinGW
Goto Forum:
  


Current Time: Thu Mar 28 12:29:32 CET 2024

Total time taken to generate the page: 0.01309 seconds