[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/master] PreviewLoader: start fake pids after PID_MAX_LIMIT
From:       Scott Kostyshak <skostysh () lyx ! org>
Date:       2020-03-28 22:59:56
Message-ID: 20200328225956.AD149280668 () lyx ! lyx ! org
[Download RAW message or body]

commit b67ff925e587acbf7b838d1a5647356bff57e3cd
Author: Scott Kostyshak <skostysh@lyx.org>
Date:   Sat Mar 28 19:12:25 2020 -0400

    PreviewLoader: start fake pids after PID_MAX_LIMIT
---
 src/graphics/PreviewLoader.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index 586ba48..0d65ccf 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;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic