[LTP] [PATCH v2] setpgid02: use 1 instead of getpgid(1)

Petr Vorel pvorel@suse.cz
Fri Mar 31 08:14:46 CEST 2023


Hi Edward,

> On Android, init does not setpgid, so getpgid(1) returns 0 and the third
> case of setting pgid to a different session's process group does not
> behave as expected: setpgid treats 0 as setting the pgid to the pid.

> Instead, replace SAFE_GETPGID(1) with the expected value of 1.

Seems to be safe.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list