patch-2.1.57 linux/kernel/sys.c
Next file: linux/mm/vmscan.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Mon Sep 22 14:55:59 1997
- Orig file:
v2.1.56/linux/kernel/sys.c
- Orig date:
Thu Sep 11 09:02:24 1997
diff -u --recursive --new-file v2.1.56/linux/kernel/sys.c linux/kernel/sys.c
@@ -25,6 +25,7 @@
#include <linux/smp_lock.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
+#include <linux/prctl.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -1004,4 +1005,26 @@
{
mask = xchg(¤t->fs->umask, mask & S_IRWXUGO);
return mask;
+}
+
+asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5)
+{
+ int error = 0;
+ int sig;
+
+ switch (option) {
+ case PR_SET_PDEATHSIG:
+ sig = arg2;
+ if (sig > _NSIG) {
+ error = -EINVAL;
+ break;
+ }
+ current->pdeath_signal = sig;
+ break;
+ default:
+ error = -EINVAL;
+ break;
+ }
+ return error;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov