Differences From Artifact [7eec7d6784fdcc79]:
- File
jim-exec.c
-
2011-07-07 11:34:33
- part of checkin
[dc83b82b9e]
on branch trunk
- Minor code cleanups
Some unused variables
Signed-off-by: Steve Bennett <steveb@workware.net.au> (user: steveb@workware.net.au
-
2011-07-07 11:34:33
- part of checkin
[dc83b82b9e]
on branch trunk
- Minor code cleanups
To Artifact [e7af7b929f100469]:
- File
jim-exec.c
-
2011-07-22 09:08:25
- part of checkin
[06d2de2213]
on branch trunk
- Fix an instance of declaration after code
Signed-off-by: Steve Bennett <steveb@workware.net.au> (user: steveb@workware.net.au
-
2011-07-22 09:08:25
- part of checkin
[06d2de2213]
on branch trunk
- Fix an instance of declaration after code
336 336 result = JIM_ERR;
337 337 }
338 338 return result;
339 339 }
340 340
341 341 void Jim_ReapDetachedPids(struct WaitInfoTable *table)
342 342 {
343 + struct WaitInfo *waitPtr;
344 + int count;
345 +
343 346 if (!table) {
344 347 return;
345 348 }
346 349
347 - struct WaitInfo *waitPtr;
348 - int count;
349 -
350 350 for (waitPtr = table->info, count = table->used; count > 0; waitPtr++, count--) {
351 351 if (waitPtr->flags & WI_DETACHED) {
352 352 int status;
353 353 int pid = waitpid(waitPtr->pid, &status, WNOHANG);
354 354 if (pid > 0) {
355 355 if (waitPtr != &table->info[table->used - 1]) {
356 356 *waitPtr = table->info[table->used - 1];