fix overload thread (#92)

Co-authored-by: Anton Nikolayev <anton.nikolayev@ringcentral.com>
This commit is contained in:
Anton Nikolaev 2023-08-28 06:27:30 +02:00 committed by GitHub
parent 64f4dfc2e5
commit d809374661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -631,7 +631,7 @@ namespace util
int status = 0;
int ret = -1;
while (1) {
ret = waitpid(pid, &status, WNOHANG);
ret = waitpid(pid, &status, 0);
if (ret == -1) break;
if (ret == 0) continue;
return std::make_pair(ret, status);