program_invocation_short_name = systemd;
prctl(PR_SET_NAME, systemd);
+ saved_argv = argv;
+ saved_argc = argc;
log_show_color(isatty(STDERR_FILENO) > 0);
log_show_location(false);
#include "exit-status.h"
#include "hashmap.h"
+int saved_argc = 0;
+char **saved_argv = NULL;
+
size_t page_size(void) {
static __thread size_t pgsz = 0;
long r;
if (program_invocation_name)
strncpy(program_invocation_name, name, strlen(program_invocation_name));
+
+ if (saved_argc > 0) {
+ int i;
+
+ if (saved_argv[0])
+ strncpy(saved_argv[0], name, strlen(saved_argv[0]));
+
+ for (i = 1; i < saved_argc; i++) {
+ if (!saved_argv[i])
+ break;
+
+ memset(saved_argv[i], 0, strlen(saved_argv[i]));
+ }
+ }
}
void sigset_add_many(sigset_t *ss, ...) {