Skip to contentSkip to conversation

sys_setsid: remove now unneeded session != 1 check

PATCH New Oleg Nesterov 1 participant 1 message Dec 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sys_setsid: remove now unneeded session != 1 check

Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack.

kernel/sys.c renamed from kernel/sys.c~ +1 -4
@@ -1056,11 +1056,8 @@ asmlinkage long sys_setsid(void)
 
 	/* Fail if a process group id already exists that equals the
 	 * proposed session id.
-	 *
-	 * Don't check if session == 1, clone(CLONE_NEWPID) creates
-	 * this group/session beforehand.
 	 */
-	if (session != 1 && pid_task(sid, PIDTYPE_PGID))
+	if (pid_task(sid, PIDTYPE_PGID))
 		goto out;
 
 	group_leader->signal->leader = 1;