[rkward/work/frameworks-Mac] rkward: Only ask launchd to start a session DBus if none is running already

R.J.V. Bertin null at kde.org
Wed Mar 28 16:38:14 UTC 2018


Git commit 3904f3609b0d657b57f62a0dbb40e1ac6b3aa585 by R.J.V. Bertin.
Committed on 28/03/2018 at 16:37.
Pushed by rjvbb into branch 'work/frameworks-Mac'.

Only ask launchd to start a session DBus if none is running already

M  +4    -2    rkward/main.cpp

https://commits.kde.org/rkward/3904f3609b0d657b57f62a0dbb40e1ac6b3aa585

diff --git a/rkward/main.cpp b/rkward/main.cpp
index c8d91185..e206bd01 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -249,8 +249,10 @@ int main (int argc, char *argv[]) {
 	}
 	// ensure that RKWard finds its own packages
 	qputenv ("R_LIBS", R_LIBS);
-    // try to ensure that DBus is running before trying to connect
-	QProcess::execute ("launchctl", QStringList () << "load" << "/Library/LaunchAgents/org.freedesktop.dbus-session.plist");
+	if (!qEnvironmentVariableIsSet ("DBUS_LAUNCHD_SESSION_BUS_SOCKET")) {
+		// try to ensure that DBus is running before trying to connect
+		QProcess::execute ("launchctl", QStringList () << "load" << "/Library/LaunchAgents/org.freedesktop.dbus-session.plist");
+	}
 #endif
 
 	// Handle --reuse option, by placing a dbus-call to existing RKWard process (if any) and exiting



More information about the rkward-tracker mailing list