Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

linux: Fix reload hangs for several minutes (#24882)

smit5c5caf1ffe27
diff --git a/crates/gpui/src/platform/linux/platform.rs b/crates/gpui/src/platform/linux/platform.rs
index 2b79c3946ae..695e9798f27 100644
--- a/crates/gpui/src/platform/linux/platform.rs
+++ b/crates/gpui/src/platform/linux/platform.rs
@@ -181,19 +181,12 @@ impl<P: LinuxClient + 'static> Platform for P {
log::info!("Restarting process, using app path: {:?}", app_path);
// Script to wait for the current process to exit and then restart the app.
- // We also wait for possibly open TCP sockets by the process to be closed,
- // since on Linux it's not guaranteed that a process' resources have been
- // cleaned up when `kill -0` returns.
let script = format!(
r#"
while kill -0 {pid} 2>/dev/null; do
sleep 0.1
done
- while lsof -nP -iTCP -a -p {pid} 2>/dev/null; do
- sleep 0.1
- done
-
{app_path}
"#,
pid = app_pid,