summaryrefslogtreecommitdiffstats
path: root/tapset/context.stp
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-05-19 19:39:43 -0400
committerWenji Huang <wenji.huang@oracle.com>2009-05-19 19:39:43 -0400
commit1ecd17fe89c67b491ed9f61ed16410b425eca99e (patch)
treec5b65520ad12273afd1ecee043c650ae151389c2 /tapset/context.stp
parentce950257b8feb87e57726044dceec40b21bc2ce7 (diff)
downloadsystemtap-steved-1ecd17fe89c67b491ed9f61ed16410b425eca99e.tar.gz
systemtap-steved-1ecd17fe89c67b491ed9f61ed16410b425eca99e.tar.xz
systemtap-steved-1ecd17fe89c67b491ed9f61ed16410b425eca99e.zip
Adapt sid to latest kernel
Diffstat (limited to 'tapset/context.stp')
-rw-r--r--tapset/context.stp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tapset/context.stp b/tapset/context.stp
index 5d855f80..468421ae 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -70,9 +70,13 @@ function ppid:long () %{ /* pure */
* leader. Session ID is stored in the signal_struct since Kernel 2.6.0.
*/
function sid:long () %{ /* pure */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
THIS->__retvalue = kread ( &(ss->session) );
CATCH_DEREF_FAULT();
+#else
+ THIS->__retvalue = task_session_nr_ns(current, &init_pid_ns);
+#endif
%}
/**