summaryrefslogtreecommitdiffstats
path: root/tapset/context.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-06-16 12:22:32 -0500
committerDavid Smith <dsmith@redhat.com>2009-06-16 12:22:32 -0500
commitbdbb4549b459294ed9bddb819e5602fb894313f7 (patch)
tree9d242348f8e2776c0d4841d0586d3b9b8d34ef7c /tapset/context.stp
parentd05b7a1c363c30c7fcd9d163f457c1ed80d28f19 (diff)
parent96b190d404d24eb7349adae6e2d57eb5c9f6c26a (diff)
downloadsystemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.tar.gz
systemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.tar.xz
systemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/transport/transport.c
Diffstat (limited to 'tapset/context.stp')
-rw-r--r--tapset/context.stp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tapset/context.stp b/tapset/context.stp
index 468421ae..5be9f21f 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -64,6 +64,19 @@ function ppid:long () %{ /* pure */
%}
/**
+ * sfunction pgrp - Returns the process group ID of the current process.
+ */
+function pgrp:long () %{ /* pure */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+ struct signal_struct *ss = kread( &(current->signal) );
+ THIS->__retvalue = kread ( &(ss->pgrp) );
+ CATCH_DEREF_FAULT();
+#else
+ THIS->__retvalue = task_pgrp_nr_ns(current, &init_pid_ns);
+#endif
+%}
+
+/**
* sfunction sid - Returns the session ID of the current process.
*
* The session ID of a process is the process group ID of the session