]> git.pld-linux.org Git - packages/SysVinit.git/blob - sysvinit-alt-fixes.patch
- updated to 3.04
[packages/SysVinit.git] / sysvinit-alt-fixes.patch
1 --- sysvinit-2.88dsf/src/init.c.wiget   2011-12-03 23:39:16.988206898 +0100
2 +++ sysvinit-2.88dsf/src/init.c 2011-12-03 23:47:53.761427001 +0100
3 @@ -911,6 +911,9 @@ void init_freeenv(char **e)
4  {
5         int             n;
6  
7 +       if (!e)
8 +               return;
9 +
10         for (n = 0; e[n]; n++)
11                 free(e[n]);
12         free(e);
13 @@ -1976,7 +1979,7 @@ void re_exec(void)
14         CHILD           *ch;
15         sigset_t        mask, oldset;
16         pid_t           pid;
17 -       char            **env;
18 +       char            **env = 0;
19         int             fd;
20  
21         if (strchr("S0123456",runlevel) == NULL)
22 @@ -2027,8 +2030,13 @@ void re_exec(void)
23         /*
24          *      The existing init process execs a new init binary.
25          */
26 -       env = init_buildenv(0);
27 -       execle(myname, myname, "--init", NULL, env);
28 +       if (pid > 0) {
29 +               /*
30 +                *      The existing init process execs a new init binary.
31 +                */
32 +               env = init_buildenv(0);
33 +               execle(myname, myname, "--init", NULL, env);
34 +       }
35  
36         /*
37          *      We shouldn't be here, something failed. 
38
This page took 0.028261 seconds and 3 git commands to generate.