diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-30 18:17:21 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-30 18:17:21 +0000 |
commit | 7ae155398062be93c71116fcc757471d5a324ddf (patch) | |
tree | 6e593a9d0ccf65ea57e7143d444258820a49c8ed /init | |
parent | a8622e049d67c5cd45a0b2e221d37b9176d98fb2 (diff) | |
download | busybox-w32-7ae155398062be93c71116fcc757471d5a324ddf.tar.gz busybox-w32-7ae155398062be93c71116fcc757471d5a324ddf.tar.bz2 busybox-w32-7ae155398062be93c71116fcc757471d5a324ddf.zip |
- consolidate "Sending SIG%s to all processes"; untested..
text data bss dec hex filename
5379 32 8 5419 152b init/init.o.oorig
5358 32 8 5398 1516 init/init.o
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 4 | ||||
-rw-r--r-- | init/init_shared.c | 8 | ||||
-rw-r--r-- | init/init_shared.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/init/init.c b/init/init.c index b17ebc2ce..d072a2209 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -683,12 +683,12 @@ static void shutdown_system(void) | |||
683 | sync(); | 683 | sync(); |
684 | 684 | ||
685 | /* Send signals to every process _except_ pid 1 */ | 685 | /* Send signals to every process _except_ pid 1 */ |
686 | message(CONSOLE | LOG, "Sending SIGTERM to all processes."); | 686 | message(CONSOLE | LOG, init_sending_format, "TERM"); |
687 | kill(-1, SIGTERM); | 687 | kill(-1, SIGTERM); |
688 | sleep(1); | 688 | sleep(1); |
689 | sync(); | 689 | sync(); |
690 | 690 | ||
691 | message(CONSOLE | LOG, "Sending SIGKILL to all processes."); | 691 | message(CONSOLE | LOG, init_sending_format, "KILL"); |
692 | kill(-1, SIGKILL); | 692 | kill(-1, SIGKILL); |
693 | sleep(1); | 693 | sleep(1); |
694 | 694 | ||
diff --git a/init/init_shared.c b/init/init_shared.c index 6404da55a..190d0a33e 100644 --- a/init/init_shared.c +++ b/init/init_shared.c | |||
@@ -44,16 +44,16 @@ int bb_shutdown_system(unsigned long magic) | |||
44 | sync(); | 44 | sync(); |
45 | 45 | ||
46 | /* Send signals to every process _except_ pid 1 */ | 46 | /* Send signals to every process _except_ pid 1 */ |
47 | message = "Sending SIGTERM to all processes."; | 47 | message = "TERM"; |
48 | syslog(pri, "%s", message); | 48 | syslog(pri, init_sending_format, message); |
49 | printf(bb_shutdown_format, message); | 49 | printf(bb_shutdown_format, message); |
50 | 50 | ||
51 | kill(-1, SIGTERM); | 51 | kill(-1, SIGTERM); |
52 | sleep(1); | 52 | sleep(1); |
53 | sync(); | 53 | sync(); |
54 | 54 | ||
55 | message = "Sending SIGKILL to all processes."; | 55 | message = "KILL"; |
56 | syslog(pri, "%s", message); | 56 | syslog(pri, init_sending_format, message); |
57 | printf(bb_shutdown_format, message); | 57 | printf(bb_shutdown_format, message); |
58 | 58 | ||
59 | kill(-1, SIGKILL); | 59 | kill(-1, SIGKILL); |
diff --git a/init/init_shared.h b/init/init_shared.h index 1e4cfac98..4431a0324 100644 --- a/init/init_shared.h +++ b/init/init_shared.h | |||
@@ -1,3 +1,4 @@ | |||
1 | extern int kill_init(int sig); | 1 | extern int kill_init(int sig); |
2 | extern int bb_shutdown_system(unsigned long magic); | 2 | extern int bb_shutdown_system(unsigned long magic); |
3 | const char * const init_sending_format = "Sending SIG%s to all processes."; | ||
3 | 4 | ||