diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 270d864a8ff1..6fec1d419714 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -436,7 +436,12 @@ struct signal_struct { | |||
436 | /* job control IDs */ | 436 | /* job control IDs */ |
437 | pid_t pgrp; | 437 | pid_t pgrp; |
438 | pid_t tty_old_pgrp; | 438 | pid_t tty_old_pgrp; |
439 | pid_t session; | 439 | |
440 | union { | ||
441 | pid_t session __deprecated; | ||
442 | pid_t __session; | ||
443 | }; | ||
444 | |||
440 | /* boolean value for session group leader */ | 445 | /* boolean value for session group leader */ |
441 | int leader; | 446 | int leader; |
442 | 447 | ||
@@ -1047,9 +1052,19 @@ static inline pid_t process_group(struct task_struct *tsk) | |||
1047 | return tsk->signal->pgrp; | 1052 | return tsk->signal->pgrp; |
1048 | } | 1053 | } |
1049 | 1054 | ||
1055 | static inline pid_t signal_session(struct signal_struct *sig) | ||
1056 | { | ||
1057 | return sig->__session; | ||
1058 | } | ||
1059 | |||
1050 | static inline pid_t process_session(struct task_struct *tsk) | 1060 | static inline pid_t process_session(struct task_struct *tsk) |
1051 | { | 1061 | { |
1052 | return tsk->signal->session; | 1062 | return signal_session(tsk->signal); |
1063 | } | ||
1064 | |||
1065 | static inline void set_signal_session(struct signal_struct *sig, pid_t session) | ||
1066 | { | ||
1067 | sig->__session = session; | ||
1053 | } | 1068 | } |
1054 | 1069 | ||
1055 | static inline struct pid *task_pid(struct task_struct *task) | 1070 | static inline struct pid *task_pid(struct task_struct *task) |