summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
Diffstat (limited to 'tapset')
-rw-r--r--tapset/context.stp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tapset/context.stp b/tapset/context.stp
index fcb60201..5d855f80 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -64,6 +64,18 @@ function ppid:long () %{ /* pure */
%}
/**
+ * sfunction sid - Returns the session ID of the current process.
+ *
+ * The session ID of a process is the process group ID of the session
+ * leader. Session ID is stored in the signal_struct since Kernel 2.6.0.
+ */
+function sid:long () %{ /* pure */
+ struct signal_struct *ss = kread( &(current->signal) );
+ THIS->__retvalue = kread ( &(ss->session) );
+ CATCH_DEREF_FAULT();
+%}
+
+/**
* sfunction pexecname - Returns the execname of a target process's parent process.
*/
function pexecname:string () %{ /* pure */