From ebf09680daf2ee9112ec869c39965369dd34c55d Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sat, 28 Mar 2020 19:12:25 -0400 Subject: [PATCH] PreviewLoader: start fake pids after PID_MAX_LIMIT (cherry picked from commit b67ff925e587acbf7b838d1a5647356bff57e3cd) --- src/graphics/PreviewLoader.cpp | 3 ++- status.23x | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 586ba48abc..0d65ccf507 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -727,7 +727,8 @@ void PreviewLoader::Impl::startLoading(bool wait) if (wait) { ForkedCall call(buffer_.filePath(), buffer_.layoutPos()); int ret = call.startScript(ForkedProcess::Wait, command); - static atomic_int fake((1 << 20) + 1); + // PID_MAX_LIMIT is 2^22 so we start one after that + static atomic_int fake((1 << 22) + 1); int pid = fake++; inprogress.pid = pid; inprogress.command = command; diff --git a/status.23x b/status.23x index 2607d611c0..74b4f04aa6 100644 --- a/status.23x +++ b/status.23x @@ -68,6 +68,7 @@ What's new * INTERNALS +- Fix wrong computation of what is an obviously fake PID number. * DOCUMENTATION AND LOCALIZATION -- 2.39.5