summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
commit230e5ab6a084ed50470f101934782dbf54b0d06b (patch)
tree5dd821c8d33f450470588e7a543f74bf74306e9e /kernel/sys.c
parentc9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff)
Merge with Linux 2.1.67.
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 9459f9b4e..f28c993a1 100644
--- a/kernel/sys.c
+++ b/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>
@@ -357,8 +358,8 @@ int acct_process(long exitcode)
fs = get_fs();
set_fs(KERNEL_DS);
- acct_file.f_op->write(acct_file.f_dentry->d_inode, &acct_file,
- (char *)&ac, sizeof(struct acct));
+ acct_file.f_op->write(&acct_file, (char *)&ac, sizeof(struct acct),
+ &acct_file.f_pos);
set_fs(fs);
}
return 0;
@@ -1005,3 +1006,25 @@ asmlinkage int sys_umask(int mask)
mask = xchg(&current->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;
+}