lkml.org 
[lkml]   [1999]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Slightly safer Magic SysRq attempt2
[ Monday, October 25, 1999 ] Ed Grimm wrote:
> Ok, if a wart it be, then maybe you'd prefer an elimination of 7 lines
> of wart and 3 lines documenting wart? These patches remove the
> offending option utterly.

Since the param has no use now, we can kill even_init too :)

James
--
Miscellaneous Engineer --- IBM Netfinity Performance Development
--- linux-2.3.23-sysrq/drivers/char/sysrq.c Mon Oct 25 22:24:09 1999
+++ linux-2.3.23/drivers/char/sysrq.c Mon Oct 25 22:33:33 1999
@@ -35,12 +35,12 @@

/* Send a signal to all user processes */

-static void send_sig_all(int sig, int even_init)
+static void send_sig_all(int sig)
{
struct task_struct *p;

for_each_task(p) {
- if (p->mm) { /* Not swapper nor kernel thread */
+ if (p->mm) { /* Not swapper nor kernel thread */
force_sig(sig, p);
}
}
@@ -115,12 +115,12 @@
break;
case 'e': /* E -- terminate all user processes */
printk("Terminate All Tasks\n");
- send_sig_all(SIGTERM, 0);
+ send_sig_all(SIGTERM);
orig_log_level = 8; /* We probably have killed syslogd */
break;
case 'i': /* I -- kill all user processes */
printk("Kill All Tasks\n");
- send_sig_all(SIGKILL, 0);
+ send_sig_all(SIGKILL);
orig_log_level = 8;
break;
default: /* Unknown: help */
\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.061 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site