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 previous 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
 
Read Message
Read Message
Read Message
Previous Topic: Equivalent in U++ to STL list container
Next Topic: Core/SSL change to let MinGW
Goto Forum:
  


Current Time: Tue Dec 01 08:57:53 GMT+1 2026

Total time taken to generate the page: 0.04194 seconds