kernel: setsid should set pgid=pid
This commit is contained in:
parent
7a935f2834
commit
e8ec1cb6c3
@ -145,6 +145,7 @@ do_fork:
|
||||
if (getpid() != pid) {
|
||||
ioctl(STDIN_FILENO, IOCTLTTYLOGIN, &uid);
|
||||
setuid(uid);
|
||||
setsid();
|
||||
toaru_auth_set_vars();
|
||||
char * args[] = {
|
||||
getenv("SHELL"),
|
||||
|
@ -1553,8 +1553,7 @@ int main(int argc, char ** argv) {
|
||||
|
||||
shell_interactive = 1;
|
||||
|
||||
setpgid(0,0);
|
||||
my_pgid = getuid();
|
||||
my_pgid = getpgid(0);
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
signal(SIGTTIN, SIG_IGN);
|
||||
|
||||
|
@ -940,7 +940,8 @@ static int sys_setsid(void) {
|
||||
return -EPERM;
|
||||
}
|
||||
current_process->session = current_process->group;
|
||||
return current_process->group;
|
||||
current_process->job = current_process->group;
|
||||
return current_process->session;
|
||||
}
|
||||
|
||||
static int sys_setpgid(pid_t pid, pid_t pgid) {
|
||||
|
Loading…
Reference in New Issue
Block a user