mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Set process name of finit fallback shell, when active
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
5903ebeb62
commit
549aeda1fd
1 file changed
+2
@@ -26,6 +26,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/prctl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <lite/lite.h>
|
#include <lite/lite.h>
|
||||||
@@ -474,6 +475,7 @@ int tty_fallback(pid_t lost)
|
|||||||
setsid();
|
setsid();
|
||||||
ioctl(STDIN_FILENO, TIOCSCTTY, 1);
|
ioctl(STDIN_FILENO, TIOCSCTTY, 1);
|
||||||
|
|
||||||
|
prctl(PR_SET_NAME, "finitsh", 0, 0, 0);
|
||||||
_exit(execl(_PATH_BSHELL, _PATH_BSHELL, NULL));
|
_exit(execl(_PATH_BSHELL, _PATH_BSHELL, NULL));
|
||||||
#else
|
#else
|
||||||
(void)lost;
|
(void)lost;
|
||||||
|
|||||||
Reference in new issue
Block a user