execude: include RuntimeScope field in ExecParameters

Let's decouple execute.c a bit from the Manager object, let's pass the
runtime scope (i.e. the enum that discern invocation for user or system
context) as part of ExecParameters. This makes the scope available in
various functions without having to pass the Manager object in.
This commit is contained in:
Lennart Poettering
2023-06-28 21:59:02 +02:00
parent 17f06e97e4
commit 170d978b2f
3 changed files with 18 additions and 7 deletions
+3
View File
@@ -27,6 +27,7 @@ typedef struct Manager Manager;
#include "numa-util.h"
#include "open-file.h"
#include "path-util.h"
#include "runtime-scope.h"
#include "set.h"
#include "time-util.h"
@@ -418,6 +419,8 @@ typedef enum ExecFlags {
/* Parameters for a specific invocation of a command. This structure is put together right before a command is
* executed. */
struct ExecParameters {
RuntimeScope runtime_scope;
char **environment;
int *fds;