Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
GPU supervisor signal test: publish its handshake files atomically (#16535)
Daniel Han6b3ea78e1f55
diff --git a/studio/src-tauri/src/linux_gpu_supervisor.rs b/studio/src-tauri/src/linux_gpu_supervisor.rsindex 82debea75aa..0762303af51 100644--- a/studio/src-tauri/src/linux_gpu_supervisor.rs+++ b/studio/src-tauri/src/linux_gpu_supervisor.rs@@ -1122,7 +1122,7 @@ mod tests {let state = state.clone();std::thread::spawn(move || {std::thread::sleep(Duration::from_millis(200));- std::fs::write(state.join("cleaned"), signal.to_string()).unwrap();+ publish(&state.join("cleaned"), &signal.to_string());std::process::exit(128 + signal);});}@@ -1141,11 +1141,7 @@ mod tests {note_window_will_show();// SAFETY: getpgrp only reads the calling process's group ID.let pgid = unsafe { libc::getpgrp() };- std::fs::write(- state.join("ready"),- format!("{} {pgid}", std::process::id()),- )- .unwrap();+ publish(&state.join("ready"), &format!("{} {pgid}", std::process::id()));for signal in signals.forever() {on_signal(signal);}@@ -1160,6 +1156,13 @@ mod tests {// An uncatchable group signal must not strand the app in its separate group.check_signal(libc::SIGKILL, true, true);+ // The parent polls these files, so a plain write can be read while still empty.+ fn publish(path: &std::path::Path, contents: &str) {+ let staged = path.with_extension("tmp");+ std::fs::write(&staged, contents).unwrap();+ std::fs::rename(staged, path).unwrap();+ }+fn check_signal(signal: libc::c_int, group: bool, parent_death: bool) {let state = tempfile::tempdir().unwrap();let mut supervisor = Command::new(std::env::current_exe().unwrap())