[PATCH] add process_session() helper routine: deprecate old field
Add an anonymous union and ((deprecated)) to catch direct usage of the session field. [akpm@osdl.org: fix various missed conversions] [jdike@addtoit.com: fix UML bug] Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
937949d9ed
commit
1ec320afdc
@@ -304,7 +304,7 @@ void __set_special_pids(pid_t session, pid_t pgrp)
|
||||
|
||||
if (process_session(curr) != session) {
|
||||
detach_pid(curr, PIDTYPE_SID);
|
||||
curr->signal->session = session;
|
||||
set_signal_session(curr->signal, session);
|
||||
attach_pid(curr, PIDTYPE_SID, session);
|
||||
}
|
||||
if (process_group(curr) != pgrp) {
|
||||
|
@@ -1259,7 +1259,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
||||
if (thread_group_leader(p)) {
|
||||
p->signal->tty = current->signal->tty;
|
||||
p->signal->pgrp = process_group(current);
|
||||
p->signal->session = process_session(current);
|
||||
set_signal_session(p->signal, process_session(current));
|
||||
attach_pid(p, PIDTYPE_PGID, process_group(p));
|
||||
attach_pid(p, PIDTYPE_SID, process_session(p));
|
||||
|
||||
|
Reference in New Issue
Block a user