lkml.org 
[lkml]   [2004]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Console: fall back to /dev/null when no console is availlable
    On Wed, Oct 06, 2004 at 12:36:21AM +0200, Andries Brouwer wrote:
    > On Tue, Oct 05, 2004 at 09:27:12PM +0100, Russell King wrote:
    > > There's a related problem. /sbin/hotplug. I keep seeing odd failures
    > > from /sbin/hotplug scripts which go away when I ensure that fd0,1,2 are
    > > directed at something real.
    >
    > Yes. In principle, user space must be able to handle the case
    > where no fds 0,1,2 are available. For example in mount.c:
    >
    > while((fd = open("/dev/null", O_RDWR)) == 0 || fd == 1) ;
    > if (fd > 2)
    > close(fd);
    >
    > or so.

    That's all well and good in theory, but do you really think that every
    single userspace program handles this case correctly?

    --
    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:06    [W:8.832 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site