lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-12-12 13:06    [W:0.036 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site