confusing behavior with no inittab and non-tty stdin
Tycho Andersen
tycho.andersen at canonical.com
Thu Nov 5 05:33:23 UTC 2015
Hi all,
I'm experiencing some confusing behavior with busybox when running it
in an LXC container. In particular, this means that stdin, stdout, and
stderr are all /dev/null when busybox is exec()'d as init.
It seems as though busybox re-opens stdin as /dev/zero (I can't quite
find where this happens), and then since there is no init tab does a,
new_init_action(ASKFIRST, bb_default_login_shell, "");
which then proceeds to spin forever, because /dev/zero never returns a
\n.
I'm not sure what the right fix is here (there is a comment about
using VC_1 instead of "" there), but the current behavior doesn't seem
ideal.
Thoughts?
Thanks,
Tycho
More information about the busybox
mailing list