From ec6782d73077bf2f6ea360a26550336dff9912e7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 29 Dec 2015 19:16:47 +0000 Subject: [PATCH] syscall_proc: use setsid() to implement setpgrp() on level 2 --- Kernel/syscall_proc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index e56081e5..e46220f9 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -569,9 +569,16 @@ setpgrp (void) Function 53 arg_t _setpgrp(void) { +#ifdef CONFIG_LEVEL_2 + /* For full session management it's a shade + more complicated and we have the routine + to do the full job */ + return setsid(0,0); +#else udata.u_ptab->p_pgrp = udata.u_ptab->p_pid; udata.u_ptab->p_tty = 0; - return (0); + return 0; +#endif } /******************************************** -- 2.34.1