mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 08:12:27 -04:00
LinuxKPI: Add group_leader member to struct task_struct.
Assign self as group leader at creation to act as the only member of a new process group. This patch is part of D19565 Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week
This commit is contained in:
parent
47e2723ad7
commit
07e0a3ca50
2 changed files with 2 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ struct task_struct {
|
|||
int rcu_recurse;
|
||||
int bsd_interrupt_value;
|
||||
struct work_struct *work; /* current work struct, if set */
|
||||
struct task_struct *group_leader;
|
||||
};
|
||||
|
||||
#define current ({ \
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ linux_alloc_current(struct thread *td, int flags)
|
|||
ts->task_thread = td;
|
||||
ts->comm = td->td_name;
|
||||
ts->pid = td->td_tid;
|
||||
ts->group_leader = ts;
|
||||
atomic_set(&ts->usage, 1);
|
||||
atomic_set(&ts->state, TASK_RUNNING);
|
||||
init_completion(&ts->parked);
|
||||
|
|
|
|||
Loading…
Reference in a new issue