fix wrong variable checking (#40185)
Co-authored-by: Xin Wang (from Dev Box) <xiwang4@microsoft.com>
wangxin12 committed
Apr 16, 2026 at 02:33 UTC
4dc10ebd65702b5856cf6b0db1f7f556ec2963d4
1 file changed
+2
-2
src/linux/init/init.cpp
+2
-2
@@ -2512,11 +2512,11 @@ Return Value:
2512
2513
int Status{};
2514
auto Pid = waitpid(-1, &Status, WNOHANG);
2515
- if (Result == 0)
2515
+ if (Pid == 0)
2516
{
2517
continue;
2518
}
2519
- else if (Result > 0)
2519
+ else if (Pid > 0)
2520
{
2521
if (Pid == distroInitPid.value())
2522
{