U++ framework
Do not panic. Ask here before giving up.

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: 1796
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: 14291
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: 1796
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: Tue Sep 15 00:34:00 GMT+2 2026

Total time taken to generate the page: 0.00728 seconds