File indexing completed on 2024-04-14 03:51:47
0001 /* 0002 SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include <QCoreApplication> 0008 #include <kupdatelaunchenvironmentjob.h> 0009 0010 // This test syncs the current environment of the spawned process to systemd/whatever 0011 // akin to dbus-update-activation-environment 0012 // it can then be compared with "systemd-run --user -P env" or watched with dbus-monitor 0013 0014 int main(int argc, char **argv) 0015 { 0016 QCoreApplication app(argc, argv); 0017 QEventLoop e; 0018 auto job = new KUpdateLaunchEnvironmentJob(QProcessEnvironment::systemEnvironment()); 0019 QObject::connect(job, &KUpdateLaunchEnvironmentJob::finished, &e, &QEventLoop::quit); 0020 return e.exec(); 0021 }