- 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
This commit is contained in:
@@ -683,12 +683,12 @@ static void shutdown_system(void)
|
|||||||
sync();
|
sync();
|
||||||
|
|
||||||
/* Send signals to every process _except_ pid 1 */
|
/* Send signals to every process _except_ pid 1 */
|
||||||
message(CONSOLE | LOG, "Sending SIGTERM to all processes.");
|
message(CONSOLE | LOG, init_sending_format, "TERM");
|
||||||
kill(-1, SIGTERM);
|
kill(-1, SIGTERM);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
sync();
|
sync();
|
||||||
|
|
||||||
message(CONSOLE | LOG, "Sending SIGKILL to all processes.");
|
message(CONSOLE | LOG, init_sending_format, "KILL");
|
||||||
kill(-1, SIGKILL);
|
kill(-1, SIGKILL);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
|
@@ -44,16 +44,16 @@ int bb_shutdown_system(unsigned long magic)
|
|||||||
sync();
|
sync();
|
||||||
|
|
||||||
/* Send signals to every process _except_ pid 1 */
|
/* Send signals to every process _except_ pid 1 */
|
||||||
message = "Sending SIGTERM to all processes.";
|
message = "TERM";
|
||||||
syslog(pri, "%s", message);
|
syslog(pri, init_sending_format, message);
|
||||||
printf(bb_shutdown_format, message);
|
printf(bb_shutdown_format, message);
|
||||||
|
|
||||||
kill(-1, SIGTERM);
|
kill(-1, SIGTERM);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
sync();
|
sync();
|
||||||
|
|
||||||
message = "Sending SIGKILL to all processes.";
|
message = "KILL";
|
||||||
syslog(pri, "%s", message);
|
syslog(pri, init_sending_format, message);
|
||||||
printf(bb_shutdown_format, message);
|
printf(bb_shutdown_format, message);
|
||||||
|
|
||||||
kill(-1, SIGKILL);
|
kill(-1, SIGKILL);
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
extern int kill_init(int sig);
|
extern int kill_init(int sig);
|
||||||
extern int bb_shutdown_system(unsigned long magic);
|
extern int bb_shutdown_system(unsigned long magic);
|
||||||
|
const char * const init_sending_format = "Sending SIG%s to all processes.";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user