diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/init_task.h | 3 | ||||
-rw-r--r-- | include/linux/sched.h | 19 |
2 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 5ac5945696a0..cae35b6b9aec 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -67,9 +67,6 @@ | |||
67 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 67 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
68 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 68 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
69 | .rlim = INIT_RLIMITS, \ | 69 | .rlim = INIT_RLIMITS, \ |
70 | .pgrp = 0, \ | ||
71 | .tty_old_pgrp = NULL, \ | ||
72 | { .__session = 0}, \ | ||
73 | } | 70 | } |
74 | 71 | ||
75 | extern struct nsproxy init_nsproxy; | 72 | extern struct nsproxy init_nsproxy; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4bbbe12880d7..13df99fb2769 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -429,7 +429,17 @@ struct signal_struct { | |||
429 | cputime_t it_prof_incr, it_virt_incr; | 429 | cputime_t it_prof_incr, it_virt_incr; |
430 | 430 | ||
431 | /* job control IDs */ | 431 | /* job control IDs */ |
432 | pid_t pgrp; | 432 | |
433 | /* | ||
434 | * pgrp and session fields are deprecated. | ||
435 | * use the task_session_Xnr and task_pgrp_Xnr routines below | ||
436 | */ | ||
437 | |||
438 | union { | ||
439 | pid_t pgrp __deprecated; | ||
440 | pid_t __pgrp; | ||
441 | }; | ||
442 | |||
433 | struct pid *tty_old_pgrp; | 443 | struct pid *tty_old_pgrp; |
434 | 444 | ||
435 | union { | 445 | union { |
@@ -1196,6 +1206,11 @@ static inline void set_task_session(struct task_struct *tsk, pid_t session) | |||
1196 | tsk->signal->__session = session; | 1206 | tsk->signal->__session = session; |
1197 | } | 1207 | } |
1198 | 1208 | ||
1209 | static inline void set_task_pgrp(struct task_struct *tsk, pid_t pgrp) | ||
1210 | { | ||
1211 | tsk->signal->__pgrp = pgrp; | ||
1212 | } | ||
1213 | |||
1199 | static inline struct pid *task_pid(struct task_struct *task) | 1214 | static inline struct pid *task_pid(struct task_struct *task) |
1200 | { | 1215 | { |
1201 | return task->pids[PIDTYPE_PID].pid; | 1216 | return task->pids[PIDTYPE_PID].pid; |
@@ -1268,7 +1283,7 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk) | |||
1268 | 1283 | ||
1269 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) | 1284 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) |
1270 | { | 1285 | { |
1271 | return tsk->signal->pgrp; | 1286 | return tsk->signal->__pgrp; |
1272 | } | 1287 | } |
1273 | 1288 | ||
1274 | pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); | 1289 | pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); |