commit sysvinit for openSUSE:Factory
Hello community, here is the log from the commit of package sysvinit for openSUSE:Factory checked in at Fri Mar 27 00:43:25 CET 2009. -------- --- sysvinit/sysvinit.changes 2009-03-13 18:00:04.000000000 +0100 +++ sysvinit/sysvinit.changes 2009-03-25 21:33:18.611211000 +0100 @@ -1,0 +2,12 @@ +Wed Mar 25 21:32:51 CET 2009 - coolo@suse.de + +- exec one more time so that the preload part does not appear + under the name of the init script in bootcharts + +------------------------------------------------------------------- +Wed Mar 25 18:06:13 CET 2009 - coolo@suse.de + +- fix the preload functionality in telling the parent process through + SIGUSR1 and SIGUSR2 about preload's presence + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- startpar-bootchart.diff startpar-preload.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysvinit.spec ++++++ --- /var/tmp/diff_new_pack.t13165/_old 2009-03-27 00:42:47.000000000 +0100 +++ /var/tmp/diff_new_pack.t13165/_new 2009-03-27 00:42:47.000000000 +0100 @@ -30,7 +30,7 @@ PreReq: coreutils AutoReqProv: on Version: 2.86 -Release: 201 +Release: 202 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel libsepol-devel @@ -63,6 +63,8 @@ Patch17: sysvinit-2.86-hddown.patch Patch18: sysvinit-2.86-selinux.patch Patch19: sysvinit-2.86-fuse-no-kill.patch +Patch20: startpar-preload.diff +Patch21: startpar-bootchart.diff %description System V style init programs by Miquel van Smoorenburg that control the @@ -110,6 +112,8 @@ popd pushd ../startpar-%{START} %patch -P 14 +%patch -P 20 +%patch -P 21 popd %_fixowner . %_fixgroup . @@ -323,6 +327,12 @@ %doc %{_mandir}/man8/mkill.8.gz %changelog +* Wed Mar 25 2009 coolo@suse.de +- exec one more time so that the preload part does not appear + under the name of the init script in bootcharts +* Wed Mar 25 2009 coolo@suse.de +- fix the preload functionality in telling the parent process through + SIGUSR1 and SIGUSR2 about preload's presence * Fri Mar 13 2009 werner@suse.de - mkill: avoid signaling process which are on shadow mounts points that is e.g. processes on /dev/pts while running mkill on /dev ++++++ startpar-bootchart.diff ++++++ --- startpar.c 2009-03-25 16:52:25.357391610 +0100 +++ startpar.c 2009-03-25 21:22:50.145032810 +0100 @@ -368,6 +368,7 @@ if (!strcmp(arg, "start")) { int s, t, len; + pid_t child; struct sockaddr_un remote; char str[100]; @@ -397,6 +398,20 @@ kill(parent, SIGUSR2); } close(s); + /* + * if we use preload, we fork again to make bootcharts easier to read. + * The reason is that the name of the init script will otherwise be used + * when in reality the above code waited for preload. If we fork away + * before the exec, the waiting code will be folded into startpar + */ + child = fork(); + if (child) { + int status; + int ret = waitpid(child, &status, 0); + if (ret == -1) + perror("waitpid"); + exit(WEXITSTATUS(status)); + } } } ++++++ startpar-preload.diff ++++++ --- startpar.c 2009-03-25 16:16:59.308479056 +0100 +++ startpar.c 2009-03-25 16:52:25.357391610 +0100 @@ -85,6 +85,19 @@ static int pidpipe[2]; static double iorate = 800.0; +void sighandler_nopreload(int x) +{ + (void)x; + ispreload = NoPreload; +} + + +void sighandler_preload(int x) +{ + (void)x; + ispreload = Preload; +} + void *xcalloc(size_t nmemb, size_t size) { void *r; @@ -253,14 +266,14 @@ return par; /* if we have preload running, we expect I/O not to be a problem */ - if (ispreload == Preload) + if (ispreload != NoPreload) prcs_blked = 0; newpar = (par*numcpu) - prcs_run + 1; /* +1 for startpar its self */ newpar -= (int)(((double)prcs_blked)*iorate); /* I/O load reduction */ #if DEBUG - fprintf(stderr, "checksystem par=%d newpar=%d (prcs_run=%u) %ld\n", par, newpar, prcs_run, time(0)); + fprintf(stderr, "checksystem par=%d newpar=%d (prcs_run=%lu) %ld\n", par, newpar, prcs_run, time(0)); dump_status(); #endif if (newpar <= 0) @@ -284,6 +297,7 @@ void run(struct prg *p) { char *m = 0; + pid_t parent = getpid(); p->len = 0; p->pid = (pid_t)0; @@ -368,7 +382,8 @@ t = connect(s, (struct sockaddr *)&remote, len); if (t != -1) { - ispreload = Preload; + if (ispreload != Preload) + kill(parent, SIGUSR1); send(s, p->name, strlen(p->name), 0); recv(s, str, 100, 0); } @@ -379,7 +394,7 @@ * In case we can't connect to it later, it means it did * its job and we can guess I/O is no longer a problem. */ - ispreload = NoPreload; + kill(parent, SIGUSR2); } close(s); } @@ -601,6 +616,9 @@ char *run_level = getenv("RUNLEVEL"); char *splashopt = 0; + (void)signal(SIGUSR1, sighandler_preload); + (void)signal(SIGUSR2, sighandler_nopreload); + (void)signal(SIGCHLD, SIG_DFL); numcpu = sysconf(_SC_NPROCESSORS_ONLN); myname = argv[0]; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de