Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/drivers/char
Modified Files:
sysrq.c
Log Message:
Synced to 2.5.7
Index: sysrq.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- sysrq.c 18 Mar 2002 19:29:10 -0000 1.19
+++ sysrq.c 22 Mar 2002 20:13:58 -0000 1.20
@@ -294,25 +294,21 @@
/* signal sysrq helper function
* Sends 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->pid == 1 && even_init)
- /* Ugly hack to kill init */
- p->pid = 0x8000;
- if (p->pid != 1)
- force_sig(sig, p);
- }
+ if (p->mm && p->pid != 1)
+ /* Not swapper, init nor kernel thread */
+ force_sig(sig, p);
}
}
static void sysrq_handle_term(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
{
- send_sig_all(SIGTERM, 0);
+ send_sig_all(SIGTERM);
console_loglevel = 8;
}
static struct sysrq_key_op sysrq_term_op = {
@@ -324,7 +320,7 @@
static void sysrq_handle_kill(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
{
- send_sig_all(SIGKILL, 0);
+ send_sig_all(SIGKILL);
console_loglevel = 8;
}
static struct sysrq_key_op sysrq_kill_op = {
@@ -333,18 +329,6 @@
action_msg: "Kill All Tasks",
};
-static void sysrq_handle_killall(int key, struct pt_regs *pt_regs,
- struct tty_struct *tty)
-{
- send_sig_all(SIGKILL, 1);
- console_loglevel = 8;
-}
-static struct sysrq_key_op sysrq_killall_op = {
- handler: sysrq_handle_killall,
- help_msg: "killalL",
- action_msg: "Kill All Tasks (even init)",
-};
-
/* END SIGNAL SYSRQ HANDLERS BLOCK */
@@ -379,7 +363,7 @@
#else
/* k */ NULL,
#endif
-/* l */ &sysrq_killall_op,
+/* l */ NULL,
/* m */ &sysrq_showmem_op,
/* n */ NULL,
/* o */ NULL, /* This will often be registered
|