← Commit list

4a9d6d1fe

"Vladimir N. Oleynik"
"Vladimir N. Oleynik"
2005-12-13
SOURCE BUG Duration: 6s

Subject

remove strange bloat dup2() usage, sync this code with mainstream login-utils, size reduce

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/getty.c+2 -3
@@ -528,12 +528,11 @@ static void open_tty(char *tty, struct termio *tp, int local)
/* Open the tty as standard input. */
+ close(0);
debug("open(2)\n");
fd = open(tty, O_RDWR | O_NONBLOCK, 0);
- if (dup2(fd, STDIN_FILENO) == -1)
+ if (fd != 0)
error("/dev/%s: cannot open as standard input: %m", tty);
- close(fd);
-
} else {
/*