Home » Community » Newbie corner » Stopping ReadStdIn() function  
	
		
		
			| Stopping ReadStdIn() function [message #57030] | 
			Sun, 16 May 2021 20:08   | 
		 
		
			
				
				
				  | 
					
						  
						Xemuth
						 Messages: 387 Registered: August 2018  Location: France
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		Hello,  
 
I'm working on a project which implement a tiny command line interface : 
Upp::String command;
LOG("Command line interface ready");
while(command != "exit" && !secureStop){
	command	= ToLower(ReadStdIn());
	Cout() << ProcessCommandLine(command);
}
 
 
secureStop boolean is use to stop my app (in case of SIGINT) however, since my while is in blocking mode because of ReadStdIn() It wont stop my app until I write something to console. 
Is there a way to set a timeout or stop the ReadStdIn() ?
		
		
		[Updated on: Sun, 16 May 2021 20:08] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 04:05:34 CET 2025 
 Total time taken to generate the page: 0.04398 seconds 
 |