mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Rename tty services early from "init" -> "getty"
Finit has support for "Please press Enter to activate this console." which means there's no getty yet running. However, when profiling systems with Finit, and embedded systems in general, a common metric is the time from power-on to getty has started. This commit makes sure to rename the process so that BusyBox pidof is capable of detecting that "getty" has started. This is mostly for the bootchart2 project's bootchartd, the native BusyBox bootchartd does not have this issue. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+33
-2
No files matched your search
+6
-2
@@ -61,8 +61,9 @@
|
||||
#include "util.h"
|
||||
#include "utmp-api.h"
|
||||
|
||||
uev_ctx_t *ctx = NULL; /* Main loop context */
|
||||
svc_t *wdog = NULL; /* No watchdog by default */
|
||||
uev_ctx_t *ctx; /* Main loop context */
|
||||
svc_t *wdog; /* No watchdog by default */
|
||||
char *arg0; /* Saved for setprocnm() */
|
||||
|
||||
|
||||
/*
|
||||
@@ -609,6 +610,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
uev_ctx_t loop;
|
||||
|
||||
/* Save argv for setprocnm() in child processes */
|
||||
arg0 = argv[0];
|
||||
|
||||
/* user calling telinit or init */
|
||||
if (getpid() != 1) {
|
||||
if (geteuid() == 0)
|
||||
|
||||
Reference in new issue
Block a user