File check-system-return-value.patch of Package eureka

From 34dd1b22adfd16b6ceddd9869bb744abef87c7b9 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Thu, 25 Jul 2024 11:44:42 +0200
Subject: [PATCH] check the return value of the systen() call

---
 src/m_testmap.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/m_testmap.cc b/src/m_testmap.cc
index 5c8a0e58..2153a4ec 100644
--- a/src/m_testmap.cc
+++ b/src/m_testmap.cc
@@ -485,7 +485,12 @@ static void testMapOnMacBundle(const Instance &inst, const fs::path& portPath)
 	SString argString = SString("/usr/bin/open -a ") + SString(portPath.u8string()).spaceEscape(true) + " --args " + inst.loaded.testingCommandLine + " " + buildArgString(args, true);
 	logArgs(argString);
 	
-	system(argString.c_str());
+	int ret = system(argString.c_str());
+	if(ret == -1)
+	{
+		ThrowException("Failed system to start %s: %s", portPath.u8string().c_str(),
+					   GetErrorMessage(errno).c_str());
+	}
 }
 
 static void testMapOnPOSIX(const Instance &inst, const fs::path& portPath)
openSUSE Build Service is sponsored by