hunk.code_window: 					.is_fullscreen()
   					.expect("Can't get fullscreen state")
   				{
   					"window_fullscreened"
   				} else {
  
hunk.labels: keep keep keep replace keep
hunk.after_edit: 					(true, "window_fullscreened")
  
hunk.file_path: apps/desktop/src-tauri/src/main.rs
hunk.type: replace
file: use std::sync::Arc;
  
  use sd_core::Node;
  use tokio::signal;
  
  /// shutdown_signal will inform axum to gracefully shutdown when the process is asked to shutdown.
  pub async fn axum_shutdown_signal(node: Arc<Node>) {
  	let ctrl_c = async {
  		signal::ctrl_c()
  			.await
  			.expect("failed to install Ctrl+C handler");
  	};
  
  	#[cfg(unix)]
  	let terminate = async {
  		signal::unix::signal(signal::unix::SignalKind::terminate())
  			.expect("failed to install signal handler")
  			.recv()
  			.await;
  	};
  
  	#[cfg(not(unix))]
  	let terminate = std::future::pending::<()>();
  
  	tokio::select! {
  		_ = ctrl_c => {},
  		_ = terminate => {},
  	}
  
  	println!("signal received, starting graceful shutdown");
  	node.shutdown().await;
  }
  