]> git.lyx.org Git - features.git/commitdiff
PreviewLoader: start fake pids after PID_MAX_LIMIT
authorScott Kostyshak <skostysh@lyx.org>
Sat, 28 Mar 2020 23:12:25 +0000 (19:12 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:55 +0000 (15:48 +0200)
src/graphics/PreviewLoader.cpp

index 586ba48abcf89038c68d603714a71e60a86e56e9..0d65ccf507ee86d64d6b64bec151b5724b863141 100644 (file)
@@ -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;