--- linux-2.6.11.6-vs1.9.5.5/kernel/sys.c 2005-04-04 05:14:16 +0200 +++ linux-2.6.11.6-vs1.9.5.5/kernel/sys.c 2005-04-04 21:54:48 +0200 @@ -1087,8 +1087,13 @@ asmlinkage long sys_setsid(void) struct pid *pid; int err = -EPERM; + printk("sys_setsid(%p): pid=%d, tgl=%d, initpid=%d\n", + current, current->pid, thread_group_leader(current), + vx_current_initpid(current->pid)); + if (!thread_group_leader(current)) return -EINVAL; + printk("sys_setsid(%p) -- no EINVAL\n", current); down(&tty_sem); write_lock_irq(&tasklist_lock); @@ -1096,6 +1101,7 @@ asmlinkage long sys_setsid(void) pid = find_pid(PIDTYPE_PGID, current->pid); if (pid || vx_current_initpid(current->pid)) goto out; + printk("sys_setsid(%p) -- no EPERM\n", current); current->signal->leader = 1; __set_special_task_pids(current, current->pid, current->pid); @@ -1105,6 +1111,7 @@ asmlinkage long sys_setsid(void) out: write_unlock_irq(&tasklist_lock); up(&tty_sem); + printk("sys_setsid(%p) -- ret=%d\n", current, err); return err; }