From a21409e6893ea48db09b78b6bd11fa0025c558c4 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Tue, 17 Feb 2026 17:17:55 -0800 Subject: [PATCH] Remove PID from unnamed buffer swap names. --- Swap.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Swap.cc b/Swap.cc index 32f73c2..4f54242 100644 --- a/Swap.cc +++ b/Swap.cc @@ -530,8 +530,7 @@ SwapManager::ComputeSidecarPath(const Buffer &buf) // Unnamed buffers: unique within the process. static std::atomic ctr{0}; const std::uint64_t n = ++ctr; - const int pid = (int) ::getpid(); - const std::string name = "unnamed-" + std::to_string(pid) + "-" + std::to_string(n) + ".swp"; + const std::string name = "unnamed-" + std::to_string(n) + ".swp"; return (root / name).string(); } @@ -1296,4 +1295,4 @@ SwapManager::ReplayFile(Buffer &buf, const std::string &swap_path, std::string & } } } -} // namespace kte +} // namespace kte \ No newline at end of file