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