summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/init_task.h11
-rw-r--r--include/linux/sched.h19
2 files changed, 23 insertions, 7 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 733790d..848a68a 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -57,17 +57,18 @@
.cpu_vm_mask = CPU_MASK_ALL, \
}
-#define INIT_SIGNALS(sig) { \
- .count = ATOMIC_INIT(1), \
+#define INIT_SIGNALS(sig) { \
+ .count = ATOMIC_INIT(1), \
.wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
- .shared_pending = { \
+ .shared_pending = { \
.list = LIST_HEAD_INIT(sig.shared_pending.list), \
- .signal = {{0}}}, \
+ .signal = {{0}}}, \
.posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
.cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
.rlim = INIT_RLIMITS, \
.pgrp = 1, \
- .session = 1, \
+ .tty_old_pgrp = 0, \
+ { .__session = 1}, \
}
extern struct nsproxy init_nsproxy;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 270d864..6fec1d4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -436,7 +436,12 @@ struct signal_struct {
/* job control IDs */
pid_t pgrp;
pid_t tty_old_pgrp;
- pid_t session;
+
+ union {
+ pid_t session __deprecated;
+ pid_t __session;
+ };
+
/* boolean value for session group leader */
int leader;
@@ -1047,9 +1052,19 @@ static inline pid_t process_group(struct task_struct *tsk)
return tsk->signal->pgrp;
}
+static inline pid_t signal_session(struct signal_struct *sig)
+{
+ return sig->__session;
+}
+
static inline pid_t process_session(struct task_struct *tsk)
{
- return tsk->signal->session;
+ return signal_session(tsk->signal);
+}
+
+static inline void set_signal_session(struct signal_struct *sig, pid_t session)
+{
+ sig->__session = session;
}
static inline struct pid *task_pid(struct task_struct *task)
OpenPOWER on IntegriCloud