aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/halt.c4
-rw-r--r--init/init.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/init/halt.c b/init/halt.c
index 785c38130..2070eaa4d 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -144,14 +144,14 @@ static int init_was_not_there(void)
144 */ 144 */
145#if 0 145#if 0
146 while (kill(1, 0) != 0 && --cnt >= 0) 146 while (kill(1, 0) != 0 && --cnt >= 0)
147 sleep(1); 147 sleep1();
148#endif 148#endif
149 /* ... so let's wait for some evidence a usual startup event, 149 /* ... so let's wait for some evidence a usual startup event,
150 * mounting of /proc, happened. By that time init should be ready 150 * mounting of /proc, happened. By that time init should be ready
151 * for signals. 151 * for signals.
152 */ 152 */
153 while (access("/proc/meminfo", F_OK) != 0 && --cnt >= 0) 153 while (access("/proc/meminfo", F_OK) != 0 && --cnt >= 0)
154 sleep(1); 154 sleep1();
155 155
156 /* Does it look like init wasn't there? */ 156 /* Does it look like init wasn't there? */
157 return (cnt != initial - 1); 157 return (cnt != initial - 1);
diff --git a/init/init.c b/init/init.c
index 28775a65c..efab5dcb4 100644
--- a/init/init.c
+++ b/init/init.c
@@ -736,7 +736,7 @@ static void pause_and_low_level_reboot(unsigned magic)
736 pid_t pid; 736 pid_t pid;
737 737
738 /* Allow time for last message to reach serial console, etc */ 738 /* Allow time for last message to reach serial console, etc */
739 sleep(1); 739 sleep1();
740 740
741 /* We have to fork here, since the kernel calls do_exit(EXIT_SUCCESS) 741 /* We have to fork here, since the kernel calls do_exit(EXIT_SUCCESS)
742 * in linux/kernel/sys.c, which can cause the machine to panic when 742 * in linux/kernel/sys.c, which can cause the machine to panic when
@@ -751,7 +751,7 @@ static void pause_and_low_level_reboot(unsigned magic)
751 * we would eternally sleep here - not what we want. 751 * we would eternally sleep here - not what we want.
752 */ 752 */
753 waitpid(pid, NULL, 0); 753 waitpid(pid, NULL, 0);
754 sleep(1); /* paranoia */ 754 sleep1(); /* paranoia */
755 _exit(EXIT_SUCCESS); 755 _exit(EXIT_SUCCESS);
756} 756}
757 757
@@ -768,12 +768,12 @@ static void run_shutdown_and_kill_processes(void)
768 kill(-1, SIGTERM); 768 kill(-1, SIGTERM);
769 message(L_CONSOLE, "Sent SIG%s to all processes", "TERM"); 769 message(L_CONSOLE, "Sent SIG%s to all processes", "TERM");
770 sync(); 770 sync();
771 sleep(1); 771 sleep1();
772 772
773 kill(-1, SIGKILL); 773 kill(-1, SIGKILL);
774 message(L_CONSOLE, "Sent SIG%s to all processes", "KILL"); 774 message(L_CONSOLE, "Sent SIG%s to all processes", "KILL");
775 sync(); 775 sync();
776 /*sleep(1); - callers take care about making a pause */ 776 /*sleep1(); - callers take care about making a pause */
777} 777}
778 778
779/* Signal handling by init: 779/* Signal handling by init:
@@ -904,7 +904,7 @@ static void stop_handler(int sig UNUSED_PARAM)
904 wpid = wait_any_nohang(NULL); 904 wpid = wait_any_nohang(NULL);
905 mark_terminated(wpid); 905 mark_terminated(wpid);
906 if (wpid <= 0) /* no processes exited? sleep a bit */ 906 if (wpid <= 0) /* no processes exited? sleep a bit */
907 sleep(1); 907 sleep1();
908 } 908 }
909 909
910 signal(SIGCONT, SIG_DFL); 910 signal(SIGCONT, SIG_DFL);
@@ -1209,7 +1209,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
1209 } 1209 }
1210 1210
1211 /* Don't consume all CPU time - sleep a bit */ 1211 /* Don't consume all CPU time - sleep a bit */
1212 sleep(1); 1212 sleep1();
1213 } /* while (1) */ 1213 } /* while (1) */
1214} 1214}
1215 1215