use bb_sanitize_stdio() where appropriate

This commit is contained in:
Denis Vlasenko
2007-01-27 22:21:12 +00:00
parent cd75a96f0f
commit e06bed30cf
5 changed files with 26 additions and 35 deletions

View File

@ -518,7 +518,7 @@ void bb_sanitize_stdio_maybe_daemonize(int daemonize)
int fd;
/* Mega-paranoid */
fd = xopen(bb_dev_null, O_RDWR);
while (fd < 2)
while ((unsigned)fd < 2)
fd = dup(fd); /* have 0,1,2 open at least to /dev/null */
if (daemonize) {
pid_t pid = fork();