From: Grazvydas Ignotas Date: Thu, 12 May 2016 00:02:40 +0000 (+0300) Subject: sysvinit: avoid wakeups X-Git-Tag: sz_176~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0bfce1aed0ffd40d02d548e53a28e550b80cb6c;p=openembedded.git sysvinit: avoid wakeups doesn't seem to be necessary from looking at the code --- diff --git a/recipes/sysvinit/sysvinit-2.86/no_wakeup.patch b/recipes/sysvinit/sysvinit-2.86/no_wakeup.patch new file mode 100644 index 0000000000..2ae885b29e --- /dev/null +++ b/recipes/sysvinit/sysvinit-2.86/no_wakeup.patch @@ -0,0 +1,53 @@ +diff -ur sysvinit-2.86_/src/init.c sysvinit-2.86/src/init.c +--- sysvinit-2.86_/src/init.c 2004-07-30 15:16:20.000000000 +0300 ++++ sysvinit-2.86/src/init.c 2016-05-12 02:37:44.943803255 +0300 +@@ -1998,7 +1998,7 @@ + * the 2.2 kernel credential stuff to see who we're talking to. + * + */ +-void check_init_fifo(void) ++void check_init_fifo(int timeout_sec) + { + struct init_request request; + struct timeval tv; +@@ -2055,13 +2055,15 @@ + + /* Wait for data to appear, _if_ the pipe was opened. */ + if (pipe_fd >= 0) while(!quit) { +- ++ struct timeval *timeout = NULL; + /* Do select, return on EINTR. */ + FD_ZERO(&fds); + FD_SET(pipe_fd, &fds); +- tv.tv_sec = 5; ++ tv.tv_sec = timeout_sec; + tv.tv_usec = 0; +- n = select(pipe_fd + 1, &fds, NULL, NULL, &tv); ++ if (timeout_sec >= 0) ++ timeout = &tv; ++ n = select(pipe_fd + 1, &fds, NULL, NULL, timeout); + if (n <= 0) { + if (n == 0 || errno == EINTR) return; + continue; +@@ -2218,7 +2220,7 @@ + warn = 0; + loglevel = -1; + if (got_signals == 0) +- check_init_fifo(); ++ check_init_fifo(5); + break; + } + if (loglevel > 0) { +@@ -2472,10 +2474,10 @@ + for(ch = family; ch; ch = ch->next) + if (ch->flags & WAITING) break; + } +- if (ch != NULL) check_init_fifo(); ++ if (ch != NULL) check_init_fifo(5); + } + #else /* CHANGE_WAIT */ +- if (ch != NULL && got_signals == 0) check_init_fifo(); ++ if (ch != NULL && got_signals == 0) check_init_fifo(-1); + #endif /* CHANGE_WAIT */ + + /* Check the 'failing' flags */ diff --git a/recipes/sysvinit/sysvinit_2.86.bb b/recipes/sysvinit/sysvinit_2.86.bb index 33e588c8f1..5df2dadb82 100644 --- a/recipes/sysvinit/sysvinit_2.86.bb +++ b/recipes/sysvinit/sysvinit_2.86.bb @@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init." SECTION = "base" LICENSE = "GPLv2+" HOMEPAGE = "http://freshmeat.net/projects/sysvinit/" -PR = "r60" +PR = "r61" # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf. # Set PACKAGE_ARCH appropriately. @@ -20,6 +20,7 @@ SYSVINIT_ENABLED_GETTYS ?= "1" SRC_URI = "ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-${PV}.tar.gz \ file://install.patch;patch=1 \ + file://no_wakeup.patch;patch=1 \ file://need \ file://provide \ file://inittab \