Skip to content

Commit

Permalink
wsd: do not complain if process is reaped already
Browse files Browse the repository at this point in the history
When a process is already reaped, waitpid(3) will
fail with errno == 0 (success). Instead of blindly
warning, we for success in errno and therefore
have nothing to warn about.

Change-Id: I4d2d35a58eb3cfe6b70b0d2593e62f4ee1015581
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
  • Loading branch information
Ashod authored and caolanm committed Dec 20, 2024
1 parent 64f9a5f commit 64fa71f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/SigUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void requestShutdown()
return std::make_pair(ret, WTERMSIG(status));
}
}
else if (pid > 0)
else if (pid > 0 && errno != 0) // Don't complain if the process is reaped already.
{
// Log errno if we had a child pid we expected to reap.
LOG_WRN("Failed to reap child process " << pid << " (" << Util::symbolicErrno(errno)
Expand Down

0 comments on commit 64fa71f

Please sign in to comment.