Re: Does init start with any open files?

From: Rob Landley
Date: Tue Dec 25 2012 - 16:40:13 EST


On 12/25/2012 01:38:09 AM, bbi5291 wrote:
When the init process is created on system startup, does it have any
open file descriptors? If so, where do they point?

Last I checked, it worked like this:

If there's a /dev/console in initramfs, stdin, stdout, and stderr will point to that. If you select no initramfs, you get one with just /dev/console. If you create your own initramfs and don't put /dev/console in it, init gets no file descriptors and there's a line about it in dmesg.

Rob--
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/