BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003514 [BusyBox] Other minor always 05-29-08 11:58 05-31-08 00:00
Reporter mnemoc View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0003514: runsvdir always warns it cannot read the directory
Description the logic of runsvdir assumes just readdir() may set errno, and relies on that to decide when to warn.

but runsv() calls vfork() which is always setting errno=2 when pid>0, so one always gets:

runsvdir: /var/service: warning: cannot read directory /var/service

I know `runsvdir` is not guilty, but I didn't know what to do on vfork()'s code to try to fix it
Additional Information busybox: 1.10.2
uclibc: 0.9.28.3 (Generic 386)
linux: 2.6.21.6-rt
CPU: Via C3
Attached Files  pkg_busybox.patch [^] (249 bytes) 05-29-08 11:58

- Relationships

- Notes
(0007914)
vda
05-30-08 23:57

This looks like better fix, no?

--- busybox.1/runit/runsvdir.c 2008-05-28 14:00:33.000000000 +0200
+++ busybox.2/runit/runsvdir.c 2008-05-31 08:54:05.000000000 +0200
@@ -141,8 +141,12 @@ static void runsvdir(void)
        }
        for (i = 0; i < svnum; i++)
                sv[i].isgone = 1;
- errno = 0;
- while ((d = readdir(dir))) {
+
+ while (1) {
+ errno = 0;
+ d = readdir(dir);
+ if (!d)
+ break;
                if (d->d_name[0] == '.')
                        continue;
                if (stat(d->d_name, &s) == -1) {
 
(0007924)
vda
05-31-08 00:00

Fixed in rev 22130.
 

- Issue History
Date Modified Username Field Change
05-29-08 11:58 mnemoc New Issue
05-29-08 11:58 mnemoc Status new => assigned
05-29-08 11:58 mnemoc Assigned To  => BusyBox
05-29-08 11:58 mnemoc File Added: pkg_busybox.patch
05-30-08 23:57 vda Note Added: 0007914
05-31-08 00:00 vda Status assigned => closed
05-31-08 00:00 vda Note Added: 0007924
05-31-08 00:00 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker