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:
Joachim Wiberg committed 2025-12-31 23:34:04 +01:00
1 parent d0176612c9
commit ce40e2b9d2
4 files changed
+33 -2

No files matched your search

+2
View File
@@ -569,6 +569,8 @@ static pid_t service_fork(svc_t *svc)
return -1;
}
#endif
if (svc_is_tty(svc))
setprocnm("getty");
sched_yield();