[DSE-Dev] run_init

Václav Ovsík vaclav.ovsik at i.cz
Tue Feb 17 10:34:23 UTC 2009


Hi,

On Tue, Feb 17, 2009 at 01:40:08PM +1100, Russell Coker wrote:
> One thing that has bitten me a couple of times is that I have tried to use 
> run_init when I had not mounted /dev/pts.  run_init gives an error message 
> about "Fork:" which doesn't help anyone in tracking down the problem (it 
> seems much more likely to have a /dev/pts problem than an actual fork 
> problem).
> 
> The misleading error message is currently in Debian and a quick scan of the 
> source code in rawhide suggests that Fedora has it too.
> 
> I suggest the following change, but something more verbose could be useful 
> too.
> 
> --- open_init_pty.c.bak 2009-02-16 21:47:28.000000000 +1100
> +++ open_init_pty.c     2009-02-16 21:48:06.000000000 +1100
> @@ -153,7 +153,7 @@
>         }
> 
>         if (child_pid < 0) {
> -               perror("Fork:");
> +               perror("forkpty():");
>                 fflush(stdout);
>                 fflush(stderr);
>                 exit(EX_OSERR);

The colon is written by perror() itself, so  perror("forkpty()") is
better.

What about the patch I did some time ago?

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474956

Can someone review it, please?

-- 
Zito



More information about the SELinux-devel mailing list