Fix the stat() return value check in createProcessGroupInternal()
From the stat() man page: "RETURN VALUE On success, zero is returned. On error, -1 is returned, and errno is set appropriately." Hence check for failure by checking whether the return value is negative instead of 1. Bug: 213617178 Test: Booted Android in Cuttlefish and inspected logcat. Fixes: 9e628a6b ("libprocessgroup: fix uid/pid hierarchy for recovery mode") Change-Id: I774d142058b083403d32b3f6aae4a4b3de00192c Signed-off-by:Bart Van Assche <bvanassche@google.com>
Loading
Please register or sign in to comment