patch-1.3.44 linux/kernel/sys.c
Next file: linux/net/802/p8022.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Fri Nov 24 16:29:29 1995
- Orig file:
v1.3.43/linux/kernel/sys.c
- Orig date:
Sun Oct 29 11:38:49 1995
diff -u --recursive --new-file v1.3.43/linux/kernel/sys.c linux/kernel/sys.c
@@ -545,6 +545,19 @@
return current->pgrp;
}
+asmlinkage int sys_getsid(pid_t pid)
+{
+ struct task_struct * p;
+
+ if (!pid)
+ return current->session;
+ for_each_task(p) {
+ if (p->pid == pid)
+ return p->session;
+ }
+ return -ESRCH;
+}
+
asmlinkage int sys_setsid(void)
{
if (current->leader)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this