summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-27 13:56:40 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:56:40 +0100
commit405f8907b9da158b8548a4d9b85871406fcc2801 (patch)
tree504b4b05f99b97b058f04a06a379ba0c8651f24b /src/basic/util.c
parent4e036b7a96b7a72461bdb68ded304041e892b8eb (diff)
process-util: actually move rename_process() over
The prototype was moved long ago, actually move the definition over now, too.
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index da7de27a04..2451da3658 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -125,37 +125,6 @@ size_t page_size(void) {
return pgsz;
}
-void rename_process(const char name[8]) {
- assert(name);
-
- /* This is a like a poor man's setproctitle(). It changes the
- * comm field, argv[0], and also the glibc's internally used
- * name of the process. For the first one a limit of 16 chars
- * applies, to the second one usually one of 10 (i.e. length
- * of "/sbin/init"), to the third one one of 7 (i.e. length of
- * "systemd"). If you pass a longer string it will be
- * truncated */
-
- prctl(PR_SET_NAME, name);
-
- 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;
-
- memzero(saved_argv[i], strlen(saved_argv[i]));
- }
- }
-}
-
noreturn void freeze(void) {
/* Make sure nobody waits for us on a socket anymore */