aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/start_stop_daemon.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 7a0d1166f..4e816bd19 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -142,18 +142,18 @@ static void do_procinit(void)
142 procdir = xopendir("/proc"); 142 procdir = xopendir("/proc");
143 143
144 pid = 0; 144 pid = 0;
145 while(1) { 145 while(1) {
146 errno = 0; /* clear any previous error */ 146 errno = 0; /* clear any previous error */
147 entry = readdir(procdir); 147 entry = readdir(procdir);
148// TODO: check for exact errno(s) which mean that we got stale entry 148// TODO: check for exact errno(s) which mean that we got stale entry
149 if (errno) /* Stale entry, process has died after opendir */ 149 if (errno) /* Stale entry, process has died after opendir */
150 continue; 150 continue;
151 if (!entry) /* EOF, no more entries */ 151 if (!entry) /* EOF, no more entries */
152 break; 152 break;
153 pid = bb_strtou(entry->d_name, NULL, 10); 153 pid = bb_strtou(entry->d_name, NULL, 10);
154 if (errno) /* NaN */ 154 if (errno) /* NaN */
155 continue; 155 continue;
156 check(pid); 156 check(pid);
157 } 157 }
158 closedir(procdir); 158 closedir(procdir);
159 if (!pid) 159 if (!pid)