diff --git a/doc/Changelog b/doc/Changelog index a8be14e..a6b73c6 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ sysvinit (2.89) UNRELEASED; urgency=low [ Jesse Smith ] + * Removed two sleep calls when we are doing sync anyway to make sure + data is being written. Speeds up reboot time by about two seconds. * Fixed Clang compiler warning regarding variable data parameters to sprintf(). * Updated top-level Makefile to work with git repo instead of old svn repo. * Removed unused variables and findtty() function in bootlogd diff --git a/src/halt.c b/src/halt.c index 5b9430c..7dbafa2 100644 --- a/src/halt.c +++ b/src/halt.c @@ -266,7 +266,11 @@ int main(int argc, char **argv) if (do_sync) { sync(); - sleep(2); + /* Sync should be fine on its own for making sure data is written. + We probably call shutdown after this anyway to clean up. + -- Jesse + sleep(2); + */ } if (do_ifdown) diff --git a/src/shutdown.c b/src/shutdown.c index f85bc38..1208c57 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -359,7 +359,8 @@ void fastdown() #endif /* script failed or not present: do it ourself. */ - sleep(1); /* Give init the chance to collect zombies. */ + /* Give init the chance to collect zombies. */ + /* sleep(1); */ /* Record the fact that we're going down */ write_wtmp("shutdown", "~~", 0, RUN_LVL, "~~");