File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // SPDX-License-Identifier: BSD-3-Clause
2- // Copyright 2026 Nitrux Latinoamericana S.C.
3-
41#include " NutsAgent.h"
52
63#include < QDir>
Original file line number Diff line number Diff line change 1- // SPDX-License-Identifier: BSD-3-Clause
2- // Copyright 2026 Nitrux Latinoamericana S.C.
3-
41#pragma once
52
63#include < QString>
@@ -96,8 +93,10 @@ class Agent {
9693 // Set by prepareUpdateTools(), used by performPackageUpdates().
9794 QString m_pkgManagerPath;
9895
99- // Set to non-zero by the POSIX signal handler (see installSignalHandlers()).
100- // Agent::exec() checks this after each command and aborts if set.
96+ public:
97+ // Written exclusively by the POSIX signal handler (see installSignalHandlers()).
98+ // Must be public so the file-scope signalHandler() function can set it.
99+ // Read inside Agent::exec() and CHECK_INTERRUPTED() — never written elsewhere.
101100 static volatile sig_atomic_t s_interrupted;
102101};
103102
Original file line number Diff line number Diff line change 1- // SPDX-License-Identifier: BSD-3-Clause
2- // Copyright 2026 Nitrux Latinoamericana S.C.
3-
4- // nuts-agent — runs as a single persistent process inside overlayroot-chroot.
5- //
6- // Usage:
7- // nuts-agent [<param-file>]
8- //
9- // <param-file> defaults to /var/cache/nuts-cpp/agent-params.ini
10- // The file is written by UpdateManager::writeAgentParams() before launching.
11- //
12- // Exit codes:
13- // 0 Success
14- // 1-7 Step failure (see Agent::run())
15- // 8 Interrupted by SIGINT / SIGTERM (cleanup() was called before exit)
16- // 125 Required parameters missing in param file
17- // 126 Param file not found
18- // 127 Must run as root
19-
201#include " NutsAgent.h"
212
223#include < QCoreApplication>
You can’t perform that action at this time.
0 commit comments