mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Follow-up to b4b7ee1, also set process name -> "init"
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
#include <sys/prctl.h>
|
||||
#ifdef _LIBITE_LITE
|
||||
# include <libite/lite.h>
|
||||
#else
|
||||
@@ -626,6 +627,7 @@ int main(int argc, char *argv[])
|
||||
/*
|
||||
* Clear command line arguments for ps display, issue #442
|
||||
*/
|
||||
prctl(PR_SET_NAME, "init", 0, 0, 0);
|
||||
for (int i = 1; i < argc; i++)
|
||||
memset(argv[i], 0, strlen(argv[i]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user