Set process name of finit fallback shell, when active

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-02-17 13:00:22 +01:00
parent 5903ebeb62
commit 549aeda1fd
+2
View File
@@ -26,6 +26,7 @@
#include <signal.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <lite/lite.h>
@@ -474,6 +475,7 @@ int tty_fallback(pid_t lost)
setsid();
ioctl(STDIN_FILENO, TIOCSCTTY, 1);
prctl(PR_SET_NAME, "finitsh", 0, 0, 0);
_exit(execl(_PATH_BSHELL, _PATH_BSHELL, NULL));
#else
(void)lost;