Messages in this thread | | | Date | Mon, 12 Dec 2005 16:18:54 +0300 | From | Oleg Nesterov <> | Subject | Re: [PATCH ? 2/2] setpgid: should work for sub-threads |
| |
Oren Laadan wrote: > > -void __set_special_pids(pid_t session, pid_t pgrp) > +void __set_special_pids(struct task_struct *tsk, pid_t session, pid_t pgrp) > { > - struct task_struct *curr = current;
Do we need to add the new paramater? I think we can just do:
- struct task_struct *curr = current; + struct task_struct *curr = current->group_leader;
and that's all. This function is called from daemonize() also, but the kernel thread is a thread group leader always.
Oleg. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |