The subsequent execv() or execl() always calls tools provided by
systemd. So, it is safe to update the variable.
_exit(EXIT_FAILURE);
}
+ r = setenv_systemd_exec_pid(true);
+ if (r < 0)
+ log_warning_errno(r, "Failed to update $SYSTEMD_EXEC_PID, ignoring: %m");
+
r = rearrange_stdio(stdin_fd, stdout_fd, STDERR_FILENO);
if (r < 0) {
log_error_errno(r, "Failed to rearrange stdin/stdout/stderr: %m");
#include "bus-log-control-api.h"
#include "bus-polkit.h"
#include "def.h"
+#include "env-util.h"
#include "fd-util.h"
#include "float.h"
#include "hostname-util.h"
_exit(EXIT_FAILURE);
}
+ r = setenv_systemd_exec_pid(true);
+ if (r < 0)
+ log_warning_errno(r, "Failed to update $SYSTEMD_EXEC_PID, ignoring: %m");
+
switch (t->type) {
case TRANSFER_IMPORT_TAR: