bug in busybox BUSYBOX_1_1_0_pre1
Vladimir N. Oleynik
dzo at simtreas.ru
Tue Dec 13 08:47:37 UTC 2005
Max,
> I ran into a problem with getty.
> If the getty is exec'ed with stdin fd closed the dup2()
> causes problems on my platform. The /bin/init is not
> busybox. And here is my quick patch to get around the
> problem.
> 533,535c533,537
> < if (dup2(fd, STDIN_FILENO) == -1)
> < error("/dev/%s: cannot open as standard input:
> %m", tty);
> < close(fd);
> ---
> > if (fd != STDIN_FILENO) {
> > if (dup2(fd, STDIN_FILENO) == -1)
> > error("/dev/%s: cannot open as standard
> input: %m", tty);
> > close(fd);
> > }
Ok. I removed strange bloat dup2() usage, synced this code with mainstream
login-utils, size reduce. See revision 12857.
--w
vodz
More information about the busybox
mailing list