Re: [PATCH] Console: fall back to /dev/null when no console is availlable

From: Russell King
Date: Wed Oct 06 2004 - 15:11:51 EST


On Wed, Oct 06, 2004 at 10:41:08AM -0700, Greg KH wrote:
> On Wed, Oct 06, 2004 at 04:00:23PM +0100, Alan Cox wrote:
> > On Maw, 2004-10-05 at 22:13, Russell King wrote:
> > > I'm redirecting them in the /sbin/hotplug script to something sane,
> > > but I think the kernel itself should be directing these three fd's
> > > to somewhere whenever it invokes any user program, even if it is
> > > /dev/null.
> >
> > Someone should yes. There are lots of fascinating things happen when
> > hotplug opens a system file, it gets assigned fd 2 and then we write to
> > stderr.
>
> Good point. So, should we do it in the kernel, in call_usermodehelper,
> so that all users of this function get it correct, or should I do it in
> userspace, in the /sbin/hotplug program?

If we're going to use /dev/console, how about we re-use what Jorn has for
opening the console when starting init(8) ?

(Appologies Jorn - I'm not on a machine which allows me to type foreign
characters, or even cut'n'paste atm.)

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/