On Sun, Sep 13, 2026 at 07:05:33PM +0200, Pavel Sanda wrote:
> > The next one uses new startscriptArgv to close kpsewhich hole
> > in a less fragile way.
> 
> Ok, with 03 class finished (invocation on load) I'll continue with
> misc lefotvers (04 class).
> 
> First - guard better esoteric biblio paperviewer from context menu.

Next one - kick another runCommand consumer from auth gate. Mechanical.

Pavel
>From 75874ecb73e306402a87eac7424482acd3400c18 Mon Sep 17 00:00:00 2001
From: Pavel Sanda <[email protected]>
Date: Sun, 13 Sep 2026 17:13:32 +0200
Subject: [PATCH 11/14] Route the gate version probe through argv form

Just mechanical rewrite.

Tier 01 DiD / argv 04b: argv-form for gate version probe

Assisted-by: Claude Opus 5
---
 src/LaTeX.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index bb9687f59f..954169e098 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -903,18 +903,22 @@ bool isProcessorGated(string const & command)
 		// written files would run planted code. createLyXTmpDir(FileName())
 		// makes a unique dir under the system temp; on failure we leave the
 		// fail-safe gated=true.
-		cmd_ret r{};
+		int probe_ret = Systemcall::NOSTART;
+		string probe_out;
 		FileName const probe_dir = createLyXTmpDir(FileName());
 		if (!probe_dir.empty()) {
 			FileName const saved = FileName::getcwd();
 			probe_dir.chdir();
-			r = runCommand(quoteName(prog) + ' ' + p.version_arg);
+			Systemcall one;
+			probe_ret = one.startscriptArgv(prog, { p.version_arg },
+							&probe_out);
 			saved.chdir();
 			probe_dir.destroyDirectory();
 		}
 		smatch m;
 		regex const re(p.version_re);
-		if (r.valid && regex_search(r.result, m, re)) {
+		if (probe_ret == Systemcall::OK
+		    && regex_search(probe_out, m, re)) {
 			int const maj = convert<int>(m.str(1));
 			int const min = convert<int>(m.str(2));
 			gated = maj < p.min_major
-- 
2.39.5

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to