Originally Posted by ao.yuan.young
There was an attribute named session in task_struct of kernel-2.4.20, but it was removed in kernel-2.6.27.
Could anyone explain the function of attribute session, and why it was removed ??
Now, the attribute session is not an attribute of struct task_struct directly. But it is still an attribute of struct task_struct, for it is wrappd by struct signal_struct. You can set its value by calling set_task_session defined in kernel-2.6.20/include/linux/sched.h.