[igt-dev] [PATCH i-g-t] lib/igt_core: Don't kill the world after a failed fork

Petri Latvala petri.latvala at intel.com
Thu Jun 4 08:39:22 UTC 2020


On Wed, Jun 03, 2020 at 03:54:14PM +0300, Arkadiusz Hiler wrote:
> If we fail to fork (e.g. due to restrictive limits) -1 gets written as
> PID of our child and we assert out.
> 
> The cleanup that happens afterwards tries to kill all our children,
> which ends up in kill(-1, SIGKILL) which is not good.
> 
> This patch makes sure of two things:
>  * -1 doesn't get written down as our child
>  * when we are killing children we make sure that pid > 0
> 
> Reported-by: Fei Yang <fei.yang at intel.com>
> Cc: Michael Hebenstreit <michael.hebenstreit at intel.com>
> Cc: Petri Latvala <petri.latvala at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>


More information about the igt-dev mailing list