From 3be79bee712aa206faf15f566803ee1a1d4dc6b0 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 9 Jan 2016 20:43:08 +0000 Subject: [PATCH] start: Make sure we don't acquire a controlling tty before running init --- Kernel/start.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Kernel/start.c b/Kernel/start.c index 94cf9473..6f374637 100644 --- a/Kernel/start.c +++ b/Kernel/start.c @@ -93,6 +93,11 @@ void create_init(void) udata.u_argn = (arg_t)PROGLOAD; udata.u_argn1 = (arg_t)(PROGLOAD + 0x8); /* Arguments (just "/init") */ udata.u_argn2 = (arg_t)(PROGLOAD + 0x10); /* Environment (none) */ + +#ifdef CONFIG_LEVEL_2 + init_process->p_session = 1; +#endif + init_process->p_pgrp = 1; } #ifndef BOOTDEVICE @@ -251,7 +256,7 @@ void fuzix_main(void) tty_init(); - if (d_open(TTYDEV, 0) != 0) + if (d_open(TTYDEV, O_NOCTTY) != 0) panic(PANIC_NOTTY); /* Sign on messages */ -- 2.34.1