swapDir->create();
#if !_SQUID_WINDOWS_
-
pid_t pid;
-
do {
- int status;
-#if _SQUID_NEXT_
-
- pid = wait3(&status, WNOHANG, NULL);
-#else
-
- pid = waitpid(-1, &status, 0);
-#endif
-
+ PidStatus status;
+ pid = WaitForAnyPid(status, WNOHANG);
} while (pid > 0 || (pid < 0 && errno == EINTR));
-
#endif
}
#if _SQUID_NEXT_
if (pid < 0)
return wait3(&status, flags, NULL);
- return wait4(cpid, &status, flags, NULL);
+ return wait4(pid, &status, flags, NULL);
#elif _SQUID_WINDOWS_
return 0; // function not used on Windows
#else