mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	server : stop gracefully on SIGTERM (#6348)
This commit is contained in:
		| @@ -3566,6 +3566,7 @@ int main(int argc, char ** argv) { | ||||
|     sigemptyset (&sigint_action.sa_mask); | ||||
|     sigint_action.sa_flags = 0; | ||||
|     sigaction(SIGINT, &sigint_action, NULL); | ||||
|     sigaction(SIGTERM, &sigint_action, NULL); | ||||
| #elif defined (_WIN32) | ||||
|     auto console_ctrl_handler = +[](DWORD ctrl_type) -> BOOL { | ||||
|         return (ctrl_type == CTRL_C_EVENT) ? (signal_handler(SIGINT), true) : false; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Eric Zhang
					Eric Zhang